Empty value in valuelist in webclient - Servoy 3.5.7

Hello,

we’ve noticed an issue in Servoy 3.5.7 webclient.

I create a valuelist. It doesn’t matter if it’s a ‘custom values’ or a database valuelist.
The “Allow empty value” box isn’t checked.
I’ve put the valuelist on combobox field with a global variable.
In SmartClient everything is fine. There is no emtpy value.
In Webclient (i’ve tested Firefox 3), there’s an empty value.

When i check the “Allow emtpy value” box, there’s a emtpy value on the Smartclient and ONE emtpy value on the Webclient.
I’ve made a sample solution.

Thanks for help.

Greetings,
Alexander

test.servoy (3.62 KB)

Can anybody verfiy this issue?

Thanks,
Alexander

Hi Alexander,

Sure, we will verify this.

Regards

I confirm: (Screen capture )

The Value list in Webclient has one empty line (Allow empty value not checked in developper)
In the webclient
When I select Entry2 then the value list Return 2 - Normal behaviour ( second picture)

Goto to another Field type something making a screen refresh and you’ll see ValueList changing (Not the returned value) from entry2 to entry1 not the globalvar attached to valuelist

Import Solution in Servoy 401 and you’ll see that (it’s worse ) you can change only 1 time the list value and after nothing changes.

XP SP3, JAVA 1.6.06 IE7 or Firefox 301

testV2.servoy (4.29 KB)

Please open a case for this (with sample solution).

Thank you.

OK Servoy issue submit, case 159604

Does anyone have an update on this? At the moment I cannot deploy latest release for 3.5.7 because of this issue - I have multiple filter criteria fields for filtering sets of records that do not hold the selected display value when user moves on to next field (actual id stored in global is retained so filters do actually work, they just show the wrong info!)

The case is on my todo, I think i will start it soon ( maybe even this week). I understand it is a problem in 3.5.7 ? In the case the version is 4.0.1 .

Thanks for the update. In answer to your question: Yes - the start of this thread is about 3.5.7, but then also in 4.0.1

looking at that picture.

Does the record at first have the value selected of one of the values in the valuelist?
Or is it really null??

If the records value is null then yes we will add a empty value because that has to be done else something is selected visually in the combo that isnt really selected…
You say if you select something the valuelist is good. then this is normal behavior for a webclient…
You can say that you have to select something in the valuelist, but if the record by default, the first time, doesnt have anything selected then there is no other option for us then to quickly have an default null value there as an option so that
the right thing is displayed to a user.

Hi Johan,

My situation may be a little different to the one that started this thread but appears to be connected, though a bit more complicated!

In my situation I have a number of global fields that I use to set filter criteria. When the filter form is first displayed all the globals are empty/null - if I understand you correctly, because the field is null, the valuelist requires an empty option so that no value is displayed in the field when the form is first shown? That I understand and it explains why a valuelist that is set to not allow an empty value still has an empty option when displayed - this only affects web client right?

My valuelists have different display and returned values (display values are text and returned values are record pks). What happens is that the user selects a value from the first valuelist - the returned pk which goes into the global is returned correctly but the displayed value is not always the selected value - often the displayed value is actually the next value up the list. For example the users selects option2 from a list of option1, option2 and option3, but the displayed value will often be option1. If the user selects option1 then the displayed value is often the empty value at the top of the list. I say ‘often’ because sometimes the display is initially correct (it sometimes sticks if you try it twice) but it then switches to the next value up the list when the user clicks on the next field to set another criteria - at this point the valuelist entries appear to redraw a couple of times and the incorrect value is left in the previous valuelist.

Sorry if this is hard to follow - I could set up an instant webinar to show it to you if that would help :)

Ok, so the white space shows because the value of global variable is not in the list of value list real values (as Johan explained). It only shows in web client. So the global variable should be initialized with an existing value in order to get rid of that empty line( maybe a fictive value ). About second part, that shouldn’t happen. The problem is I cannot reproduce that. I played with your sample from case but it seems to work well ( only once managed to get in a similar situation as in your picture but don’t know exactly how). Can you try on latest version to see if the problem persists ?

I attach a small solution that mimics what I do with the filters and global fields. The contents of the company value list is based on the contact selected. It is not 100% consistent but most of the time when you have selected a contact and then select the company, the displayed value for the selected contact changes, though the pk returned in the global remains constant. This is in web client only of course - in smart client it behaves as expected. (I should make clear this is in 3.5.7)

See if you get the same result :)

wc_combo_test.servoy (4.5 KB)

It seems you forgot to export the data in your solution. Anyway, I added some test data but still couldn’t find anything wrong. I see you have companies to contacts in relation one to many, then shouldn’t the selection be the other way around? So first select a company, then one of the contacts from the company ( so databinding to be inverted). Then you can also do this without any custom sql, just using valuelists/relations.

Sorry about the missing data :oops:

The relationship is not really relevant for the example though I take your point. In my full solution I have to set the value lists via query as it is too complex for normal relationships to work - so I wanted to make the example work in the same way to demonstrate the same issue - so I ignored the relationship and constructed it to mimic my full solution.

But the real issue is - when you run this in web client you do not have the issue I described? i.e. the first value remains fixed after the second value is selected? If so that points to something odd going on in my installation - I will test in a clean install.

Because of the relation stuff i can only select one company. When I select it the contact value remains the same. If I select another contact the companies combo will show an empty value (which is normal). I will try the other way around, so that i can choose from more options on second combo. I will also try on 3.5.7 install. Be right back.

I managed to reproduce this issue consistently on 3.5.7 install. However on latest sources everything is fine. So, it was fixed meanwhile. Either wait until 3.5.8 is released ( don’t know when) or ask for an intermmediate build.

Great - at least I can stop worrying that my installation was doing something odd :D

Thanks for the update