Re: WOPopUpButton
Re: WOPopUpButton
- Subject: Re: WOPopUpButton
- From: "Daniele Corti" <email@hidden>
- Date: Fri, 16 Mar 2007 09:14:19 +0100
2007/3/16, rene marxis <email@hidden>:
Hello
I am new to WO and have some question on WOPopUpButton.
I have one form with 2 fields (name, street) and 2 WOPopUpButtons (country, cities).
I like the cities popup to change dynamicly when the country changes. All 4 fields are in one WOForm.
To manage this i did the following:
Add one hidden field to the form that i set with
false;";
This feld is of course bound to one String in the class.
All other WOText elemets are bound to some item coming from DB.
On Submit of the form (which is an action DoSave) i do check the isSelectCountry and if it is .equals("1") i do set it back to "0" and just return null.
This seems to work ok. but i get some message on the console from the workerthread, that my entity "name" which is defined "not null" in the my model, is not allouwed to be null when adding a new item and don t have data entered for the name and/or street.
First question: Is this the way to manage such situations or is there some better one. Probaby something like ajax?
Second: How can i overcome the "null" problem?
when you add the bind value to the TextField, don't use a variable, but the pair of get/set methods, and, in the set, check if the value passed is null, if so, use a default value (
e.g. "_NULL_").
Many thanks in advance
rene
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (
--
Daniele Corti
AIM: S0CR4TE5
Messenger:
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden