What I did for fix the problem was change the readonly Select for a readonly
input and now all works great, but is a bug no doubt about it :P

On 8/17/07, daniel ccss <[EMAIL PROTECTED]> wrote:
>
> 1- 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
>
> Nop, the value before is 21, if the select is not readonly then the value
> I get is 21 if is readonly is 0
>
> 2-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.
>
> Yes I understand the concept that the validator and converter are only
> called when the required attribut is set to true (don`t agree with that
> concept) so I made the validation of this not required values on the
> backing_bean
>
>
>
>
> On 8/17/07, David Delbecq <[EMAIL PROTECTED]> wrote:
> >
> > En l'instant précis du 16/08/07 22:48, daniel ccss s'exprimait en ces
> > termes:
> > > 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.
> >
> >
> > --
> > http://www.noooxml.org/
> >
> >
>

Reply via email to