You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Swanthe Lindgren <sw...@megasol.se> on 2008/10/24 09:33:25 UTC

Re: Updating model for DropDownChoice

If you combine setNullValid(true) with putting

myComponent.nullValue=My null value

in the properties file, you will always get a default null value with 
the title "My null value".

//Swanthe

nanotech wrote:
> Hi,
>
> I have a search form which contains multiple search fields(as TextFields)
> and also there is dropdown from which user can select the search criteria.
> The search results are displayed in the same page at bottom.
> I want to clear the search Form with help of "Reset" button in the form.
> Question :
> 1. If I refresh the form(by wrapping it in WebMarkupContainer) it removes
> the "Choose One" field. The solution to that I found was to set
> setNullValid(true). But, the problem with that is it just displays the empty
> value..but I really want "Choose One" or "Select One" in dropdown. Even by
> putting "null=Select One" in properties file, it does not show "Select One"
> option in drop-down if I have setNullValid(true) . So, How Can I have both?
> i.e When I set "setNullValid(true)" how can I get "Select One" to show up in
> DropDown.
>
> 2. Also, when I update the webmarkupcontainer, to clear the search the
> dropdown still shows the pervious search criteria. It does not update the
> model for dropdown to first value or "Choose One".
>
> Can someone please give me pointers?
>
> Thanks,
> ~R 
>   



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org