onaction in find mode

Questions, tips and tricks and techniques for scripting in Servoy

onaction in find mode

Postby Hans Nieuwenhuis » Wed Mar 21, 2012 3:35 pm

Hi,

For a button to fire it's method in find mode I use : //controller.search()

Is this also possible for a radio button (onAction method) ? controller.search does not seem to work.

Depending on the selected radio button, I want to show different fields in the form

Regards,
Hans Nieuwenhuis
Betagraphics
http://www.deltics.nl
http://www.betagraphics.nl

Servoy Version 7.3.1
Java version 1.7.0.x
Database Oracle 11g
User avatar
Hans Nieuwenhuis
 
Posts: 1026
Joined: Thu Apr 12, 2007 12:36 pm
Location: Hengelo, The Netherlands

Re: onaction in find mode

Postby Peter de Groot » Wed Mar 21, 2012 4:00 pm

Hi,

Maybe using onDataChange event of the radio.
Peter de Groot
 
Posts: 215
Joined: Thu Jan 10, 2008 8:38 pm
Location: Not sure...

Re: onaction in find mode

Postby Hans Nieuwenhuis » Wed Mar 21, 2012 4:03 pm

Noop, ondatachange does not fire in find mode
Hans Nieuwenhuis
Betagraphics
http://www.deltics.nl
http://www.betagraphics.nl

Servoy Version 7.3.1
Java version 1.7.0.x
Database Oracle 11g
User avatar
Hans Nieuwenhuis
 
Posts: 1026
Joined: Thu Apr 12, 2007 12:36 pm
Location: Hengelo, The Netherlands

Re: onaction in find mode

Postby jcompagner » Mon Mar 26, 2012 5:16 pm

i think it should work fine
if i quickly test in servoy 6 and i add : @AllowToRunInFind to the doc of the onaction of a radiobutton (or radio choice)
and the onaction was executed in find and in browse mode.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8284
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: onaction in find mode

Postby Hans Nieuwenhuis » Mon Mar 26, 2012 6:36 pm

Thanks,

Will it also work in 5.2.12 ?

Regards,
User avatar
Hans Nieuwenhuis
 
Posts: 1026
Joined: Thu Apr 12, 2007 12:36 pm
Location: Hengelo, The Netherlands

Re: onaction in find mode

Postby jcompagner » Mon Mar 26, 2012 10:38 pm

@allowtoruninfind is new in 6
its a replacement of just adding controller.search() somewhere in the code of the previous version.
I haven't tested it in 5, but i think it should work
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8284
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Methods

Who is online

Users browsing this forum: No registered users and 1 guest