combobox and calendar fields wrong behavior in find mode

If I set a calendar or combobox field as readonly and I enter find mode it’s not possible to use them in the find. However, other fields as text fields or textareas become enabled when entering find mode.

Well, the calendar button doesn’t work, but you can enter manually the date on the text field. However, comboboxes don’t work at all and become useless on find mode.

Is this a bug?
Do you know any easy workaround?

Hi janteque,

What version of Servoy are you using?
Also what kind of valuelist do you use with the combobox, one that is using a relationship?

We’re using 3.5.6.

I’ve attached a sample solution to show this behavior. In the main form I use an onLoad method to set some fields to readOnly.

When you enter find mode, each of this fields behave differently:

Calendar: you can enter manually a date, but you can’t use the calendar button
Text field: you can use it as usual
Text_field with value list: you can enter text or use the valuelist
Combo_box with valuelist: you can’t enter text nor use the valuelist

searchSample.servoy (4.81 KB)

Hi Pablo,

I tested it on Mac OS X and Windows XP with Java 1.5 and it all works for me in find mode. The Calendar datepicker works and the combobox works fine too.
Only thing you did wrong though was to set the combobox field to readonly in the onLoad method.

What Java version do you use ?

This are servoy and java version:

Version 3.5.6-build 519
Java version 10.0-b19 (Windows XP) (It has to be 1.6.0_05)

I’ve also tried with 1.5:

Servoy Developer
Version 3.5.6-build 519
Java version 1.5.0_10-b03 (Windows XP)

But no luck either.

however I don’t understand why it’s wrong to set a combobox as readonly in the onLoad event. What we want is that, depending on the user role and profile the field will be readonly or not, but we don’t want the user to modify it, but he should be able to use in the search.

janteque:
however I don’t understand why it’s wrong to set a combobox as readonly in the onLoad event. What we want is that, depending on the user role and profile the field will be readonly or not, but we don’t want the user to modify it, but he should be able to use in the search.

You hit a bug with the calendar button in find mode icw readonly, we will have a look if its possible to have the expected behaviour for combobox as well.
This problem is filled as case 142141

Thanks Jan.

I hope it’ll be fixed soon

btw, is there a way to be informed on changes on the case?

Normally if you report it your self in the support system at: http://forum.servoy.com/viewtopic.php?t=6062 you will be nofied.
For this one we added the remark to post also here when resolved

The issues are solved in Servoy 4.0.0 and Servoy 3.5.7. Combos and calendar fields should become usable in find mode - if they are enabled. Read-only and editable do not matter.

Hi Andrei,

Does this mean that text fields en text areas that are non-editable will also become usable in find mode ?
In fact all field types ??

This would be excellent !!

As far as i can see this is not the case in 3.5.6

Hans

Well, text-fields and text areas are already supposed to do that. You can have a read-only and/or non-editable text field or text area and that should become editable when you enter find mode (if the data-provider is from the DB).

Just make sure that the field is enabled. Disabled fields will remain disabled even in find mode.
Is this not working for you?

Hi Andrei,

It is working for me but there is a bug/limitation.

If you have a form in record view and the onFindCmd is :

controller.find()
controller.readOnly = false;

the non-editable fields are not usable.
In list and tableview this is no problem.

After a discussion with Sanneke Aleman i changed the code to :

controller.readOnly = false;
controller.find()

and now it also works in record view

Regards,

Please add an issue to the support system for this.
I see there are a few use cases like this that do not work as expected.

Created a case : 147900

Regards,

Hi,

will it be possible to type searchcriteria in readony comboboxes in find mode ? and not only select from the list

if so, will this apply to all types of valuelist ?

  • based on array of values, or based on table or based on a relation
  • using separate display value and stored value or not.

in other words : can you type search criteria with all readonly comboboxes ?

Regards,

Hi Andrei,

Can you or one of the other Servoyans answer the question about entering searchcriteria in a comboxbox :

will it be possible to type searchcriteria in non-editable comboboxes in find mode ? and not only select from the list

if so, will this apply to all types of valuelist ?

  • based on array of values, or based on table or based on a relation
  • using separate display value and stored value or not.

in other words : can you type search criteria with all non-editable comboboxes ?

I did some testing and it looks like you can only enter searchcriteria if the connected valuelist is a manual valuelist.

Regards

I had an incident with my email client - and didn’t see the reply notifications. Sorry for the delay.

All smart client combo-boxes except the ones marked viewable but not accessible by security and the ones using separate display value/stored value should be editable in find mode & allow search criteria. These include:

  • read-only combos
  • non-editable combos
  • disabled combos
    with any valuelist type except the ones with separate display/stored(real) values.

Currently I noticed this doesn’t work well because of a misbehavior of editable combo-boxes on some JVM/OS/J&F versions that ignored values that were not found in the attached valuelist when you pressed ENTER. It should be fixed in Servoy 3.5.8 and 4.0.2. For example, try writing a search criteria in a combo in find mode and then instead of hitting ENTER give focus to a text field and press ENTER.

Thanks Andrei,

This clarifies things !

Regards,

Hans Nieuwenhuis