myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Delbecq <>
Subject Re: 2 problems (JSF+Tomahawk)
Date Fri, 17 Aug 2007 06:57:48 GMT
En l'instant précis du 16/08/07 22:48, daniel ccss s'exprimait en ces
> Hi all, I think I have found 2 problems (JSF+Tomahawk)
> 1- If the property readonly of a <h:selectOneMenu is set to true, and
> in the backing_bean when i try to get the value of the selectOneMenu
> item I always get a 0, if i set readonly to false, I get the correct
> value of the <h:selectOneMenu
I the component is readonyl, it will never update the backing bean's
value. That mean the value of your getXxx() in you backing bean will be
the same you initialized it with programmatically
> 2-If a property in the JSP don´t have the required property to true
> either a validator nor a converter can be applied to it. It seem only
> the required properties can be validates, but what if I want to apply
> a validator to a property when it has a value?
For the validators and converters to be called, there must be a non
empty submitted value. The fact your validator don't get called if you
don't set required to true is due to you submitting an empty value for
your component. For example, if you set a validator that check email
correctness and you *don't* set the required attribute on h:inputText,
the form will be valid if user submit a correct email *or* user don't
fill the email field.


View raw message