TEXT_FIELD with a value list do not accept other values.

Forum to discuss the Web client version of Servoy.

TEXT_FIELD with a value list do not accept other values.

Postby udrescu_bogdan » Mon Jul 18, 2011 12:20 pm

Hi,

A TEXT_FIELD or TYPE_AHEAD that has a value list attached do not accept other values then the ones in the value list, although in the SmartClient they do! The database field that is bound with the control field is of type TEXT.

Is there any way so they can accept other text values then those form the value list also in the WebClient?

Thanks,
Bogdan.
udrescu_bogdan
 
Posts: 336
Joined: Fri Jun 18, 2010 3:27 pm
Location: Craiova, Romania

Re: TEXT_FIELD with a value list do not accept other values.

Postby Joas » Mon Jul 18, 2011 2:03 pm

If your valuelist has different display and real values, then you can only enter values that are in the valuelist.
If the display and real value of your valuelist are the same, then you can also enter other values.

This should work the same in both smart and webclient.

Which Servoy version do you use?
Joas de Haan
Yield Software Development
Need help on your project? yieldsd.com
User avatar
Joas
Site Admin
 
Posts: 842
Joined: Mon Mar 20, 2006 4:07 pm
Location: Leusden, NL

Re: TEXT_FIELD with a value list do not accept other values.

Postby udrescu_bogdan » Mon Jul 18, 2011 2:10 pm

5.2.9

The display and real values are different. In SmartClient I can fill in other values different from the real or display values from the value list which is OK. But not in the WebClient.
udrescu_bogdan
 
Posts: 336
Joined: Fri Jun 18, 2010 3:27 pm
Location: Craiova, Romania

Re: TEXT_FIELD with a value list do not accept other values.

Postby udrescu_bogdan » Mon Jul 18, 2011 2:40 pm

Hi,

If you think you need to fix this, please don't fix it as you described that it should work! Let the user fill in anything he wish in the TEXT_FIELD or TYPE_AHEAD, even if it's in the value list or not.

That display value == real value issue doesn't make sense for the user!

If you need, I can make a case with a feature request or bug, whatever you want!

Thanks,
Bogdan.
udrescu_bogdan
 
Posts: 336
Joined: Fri Jun 18, 2010 3:27 pm
Location: Craiova, Romania

Re: TEXT_FIELD with a value list do not accept other values.

Postby Joas » Mon Jul 18, 2011 2:49 pm

udrescu_bogdan wrote:In SmartClient I can fill in other values different from the real or display values from the value list

Will anything be saved in the database then? I don't think that should be possible.

udrescu_bogdan wrote:That display value == real value issue doesn't make sense for the user!

No, but why do you use it anyway if the user should be able to just type in anything?
Joas de Haan
Yield Software Development
Need help on your project? yieldsd.com
User avatar
Joas
Site Admin
 
Posts: 842
Joined: Mon Mar 20, 2006 4:07 pm
Location: Leusden, NL

Re: TEXT_FIELD with a value list do not accept other values.

Postby udrescu_bogdan » Mon Jul 18, 2011 3:28 pm

Will anything be saved in the database then? I don't think that should be possible.

Yes, it is saved correctly in the database!

No, but why do you use it anyway if the user should be able to just type in anything?

In the fields for which I have the problem, the user fills in the ICAO code of an airport which is composed of 4 uppercase chars. We have in our value list most of the airports ICAO codes around the world, and in the display value we also display the location/city/country/whatever. But, in case one airport is not present there we just want the user to type whatever he wants. In the database we save only the ICAO code.
udrescu_bogdan
 
Posts: 336
Joined: Fri Jun 18, 2010 3:27 pm
Location: Craiova, Romania

Re: TEXT_FIELD with a value list do not accept other values.

Postby Joas » Mon Jul 18, 2011 3:36 pm

Ok. Well, if something like this behaves differently in web and smartclient, than that is most likely a bug. Please create a case about that in the support system with a sample solution attached: http://www.servoy.com/s
Joas de Haan
Yield Software Development
Need help on your project? yieldsd.com
User avatar
Joas
Site Admin
 
Posts: 842
Joined: Mon Mar 20, 2006 4:07 pm
Location: Leusden, NL

Re: TEXT_FIELD with a value list do not accept other values.

Postby jcompagner » Mon Jul 18, 2011 4:56 pm

this is weird if you use a TextField with a valuelist that has real and display values then it shouldn't be possible to get a typed value in
That only works if it only has display values (or only real depending on how you see it)

i just did a quick test in 6 (and looked at the code from 5 which is the same) and a null is generated for a input that can't be resolved in the realvalues. So a null will be inserted.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: TEXT_FIELD with a value list do not accept other values.

Postby udrescu_bogdan » Mon Jul 18, 2011 5:32 pm

I can use a TYPE_AHEAD or a COMBOBOX, it doesn't matter as long as the users can type something different then what is in the value list, and that new value will be saved.

But, if you look on the link that I posted in the case I just opened, it behaves like this:

SmartClient - new values typed in are saved with no problem in the database, which I liked. This is what we want!
WebClient - If I type something different, even empty text, when leaving the field it will automatically fills in the first item in the value list. For this I only need to click inside the field so it gets the focus, and then leave, without even typing something. This we don't like! :)
udrescu_bogdan
 
Posts: 336
Joined: Fri Jun 18, 2010 3:27 pm
Location: Craiova, Romania

Re: TEXT_FIELD with a value list do not accept other values.

Postby jcompagner » Mon Jul 18, 2011 5:38 pm

i have no idea how it is that your first point works then, i just can't reproduce that behavior. When having a valuelist that has Real And Display values the typed in value must map on a real (through the display that is typed)
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: TEXT_FIELD with a value list do not accept other values.

Postby udrescu_bogdan » Mon Jul 18, 2011 5:41 pm

Have you tried it also in our online solution, in the SmartClient?
udrescu_bogdan
 
Posts: 336
Joined: Fri Jun 18, 2010 3:27 pm
Location: Craiova, Romania

Re: TEXT_FIELD with a value list do not accept other values.

Postby jcompagner » Mon Jul 18, 2011 5:45 pm

no but then i don't see the code or how it is configured.

But if you create just a very simple solution 1 textfield build on a text dataprovider
attach a valuelist (lets say a custom with these entries:

tst1|tst1
tst2|tst2
tst3|tst3

can you get something in that field in the database that is not 1 of those?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: TEXT_FIELD with a value list do not accept other values.

Postby udrescu_bogdan » Mon Jul 18, 2011 5:47 pm

OK, I see... the problem is that our valuelist has real values different then the display values. Can this be the reason? Because earlier Joas said something about this.
udrescu_bogdan
 
Posts: 336
Joined: Fri Jun 18, 2010 3:27 pm
Location: Craiova, Romania

Re: TEXT_FIELD with a value list do not accept other values.

Postby udrescu_bogdan » Mon Jul 18, 2011 5:54 pm

I tested again with the real values == display values and it behaves the same. In SmartClient new data typed by the user is saved in the database, in WebClient the first value from the value list is selected if the data typed does not belong to the value list.
udrescu_bogdan
 
Posts: 336
Joined: Fri Jun 18, 2010 3:27 pm
Location: Craiova, Romania

Re: TEXT_FIELD with a value list do not accept other values.

Postby jcompagner » Mon Jul 18, 2011 5:55 pm

that doesnt matter:

test1|tst1
test2|tst2
test3|tst3
test4|tst4

This is how servoy is designed, that when you have real and display (that means what you see and type is different data then what is in the db) you can't insert just display data.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Next

Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 6 guests