onAction on search mode

Hi there,

The onAction event for fields on find mode has no effect. Is this an intended one?

In my solution when the user clicks a button it opens up a new formInDialog window in find mode. User enters search values and click a button that closes the formInDialog and continues the search.

I thought when the user presses return after entering a value in a field the onAction method on the field should close the formInDialog and continue the search. But I could not do that now because of the above reason.

Thanks

in find mode all scripts are disabled. (therefor all actions)

It is very annoying that I can not run a method through a button when the controller is in find mode.

I use two date picker icons buttons together with a date field. One is for choosing a single date and another one is for to choose a date range (which shows the calendar twice). The method attached to it scripted to show the calendar using application.showCalendar() and set the date field with proper date and date range. But this is not working in find mode. The method just not running at all. It is quite annoying. I always do this Filemaker Pro from earlier versions and I simply LOST that beautiful functionality in the beautiful servoy.

Please… make this possible dear Servoyians!!!

Thanks a million.

faheemhameed:
It is very annoying that I can not run a method through a button when the controller is in find mode.

I use two date picker icons buttons together with a date field. One is for choosing a single date and another one is for to choose a date range (which shows the calendar twice). The method attached to it scripted to show the calendar using application.showCalendar() and set the date field with proper date and date range. But this is not working in find mode. The method just not running at all. It is quite annoying. I always do this Filemaker Pro from earlier versions and I simply LOST that beautiful functionality in the beautiful servoy.

Please… make this possible dear Servoyians!!!

Thanks a million.

Why don’t you make the selection happen before entering find mode?

Date selection is made only by the users. So I cannot make the date selection before entering find mode. And if you set the dates before find mode then date is permanently updated in the database that I don’t want to.

Please see attachment to view how date pickers appear in the find mode.

in 3.0 we had already support for executing a button in find mode for the web but only if that button does the search (so it does controller.search somewhere in the code). This same behaviour is also now also used in the smartclient of 3.0b3

So buttons will execute the code when there is a controller.search somewhere in the code.

It is nice that there is a progress on this issue. Thanks for that.

But in my case I do not want to do controller.search() in the method. I just want to pickup date from the date picker.

controller.find();

var dateVar1 = application.showCalendar();
var dateVar2 = application.showCalendar();
var dateVarText = utils.dateFormat(dateVar1, "dd-MM-yyyy") + "..." + 
                  utils.dateFormat(dateVar2, "dd-MM-yyyy") + "|dd-MM-yyyy"
date1 = dateVarText;
plugins.dialogs.showErrorDialog( "", date1);
controller.search();

my above code works fine which indeed shows two calendar dialogs and one other dialog in find mode. If this script can run properly then there should be no problem for you allow button actions and other actions when controller is waiting in the find mode too.

I hope I am asking a basic thing and not asking a thing that is illogical and very hard to do.

Thanks for you great work. I really really appreciate your work that made our lives really smarter!!

If you do find and search in one method, why do a controller find first?

var dateVar1 = application.showCalendar();
var dateVar2 = application.showCalendar();
var dateVarText = utils.dateFormat(dateVar1, "dd-MM-yyyy") + "..." +
                  utils.dateFormat(dateVar2, "dd-MM-yyyy") + "|dd-MM-yyyy"
controller.find();
date1 = dateVarText;
plugins.dialogs.showErrorDialog( "", date1);
controller.search();

My code is just an example. That is not the code I am using in my application. May be I am not clear enough to you.

I am trying to tell you if the controller.find() & controller.search() are in the same method then I can write code to show dialogs or anyother thing in between them.

So when the controller.find() and controller.search() are in two different methods why can’t I run a third method which shows just the date picker (or anything else)?

third method triggered by a button:

if(false) controller.search();

Just have been thinking about a work around. Thanks for showing me the workaround. That’s great!

I am not sure why we do this work around like Filemaker? Why can’t you allow a method to run eventhough there is no controller.search()?

I am thinking that Servoy should be smart and clean of FMP like workaround. Is there a special reason for the workaround?

By the way when will be smartclient 3.0b3 available?

we can’t have that just every method executes within the search status. That can mess things up big time.

So now you as in developer are in controll. If we find a controller.search() then we think you as developer does know what he is doing.

Oh Ok. May be you are thinking ahead about new servoy developers who have less programming knowledge and mess the forums with silly questions.

Good thinking!

Please let me know when will be smartclient 3.0b3 available?

Thanks.