You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by dm...@mail.ru on 2007/08/30 15:29:49 UTC

[Trinidad] Client-side validation of conditionally disabled inputText

Hi!
I have some problem with client-side validation (CSV) of conditionally disabled field marked as required.

Let's say that there is some inputText:
<tr:inputText disabled="#{bean.disabled}" required="true" />

Intially, bean.disabled is true, so inputText is disabled and if we try to submit relative form no "value required" errors will issue.
However, if:
1. some event change bean.disabled to false and trigger ppr with that input, and after that
2. some other event change bean.disabled back to true and ppr that inputText yet again

then inputText will still be marked as required field on client, though it is disabled.
It leads CSV to issue error in FF on disabled field and to "cannot focus disabled element" error in IE. Sadly, it renders whole form totaly unusable :(
Am I missing some special configuration?

Thanks.

Re[2]: [Trinidad] Client-side validation of conditionally disabled inputText

Posted by dm...@mail.ru.
****... somebody replaced libs in our main repo with last 1.0.3 snapshot. Didn't notice it in the first place.
False alarm.

Thanks for pointing out where to look :)

> 
> Which version of Trinidad?
> 
> On 8/30/07, dmgloss@mail.ru <dm...@mail.ru> wrote:
> >
> > Hi!
> > I have some problem with client-side validation (CSV) of conditionally
> > disabled field marked as required.
> >
> > Let's say that there is some inputText:
> > <tr:inputText disabled="#{bean.disabled}" required="true" />
> >
> > Intially, bean.disabled is true, so inputText is disabled and if we try to
> > submit relative form no "value required" errors will issue.
> > However, if:
> > 1. some event change bean.disabled to false and trigger ppr with that
> > input, and after that
> > 2. some other event change bean.disabled back to true and ppr that
> > inputText yet again
> >
> > then inputText will still be marked as required field on client, though it
> > is disabled.
> > It leads CSV to issue error in FF on disabled field and to "cannot focus
> > disabled element" error in IE. Sadly, it renders whole form totaly unusable
> > :(
> > Am I missing some special configuration?
> >
> > Thanks.
> >
> 
> 
> 
> -- 
> Chordiant Software Inc.
> www.chordiant.com
> 
> 

Re: [Trinidad] Client-side validation of conditionally disabled inputText

Posted by Danny Robinson <da...@gmail.com>.
Which version of Trinidad?

On 8/30/07, dmgloss@mail.ru <dm...@mail.ru> wrote:
>
> Hi!
> I have some problem with client-side validation (CSV) of conditionally
> disabled field marked as required.
>
> Let's say that there is some inputText:
> <tr:inputText disabled="#{bean.disabled}" required="true" />
>
> Intially, bean.disabled is true, so inputText is disabled and if we try to
> submit relative form no "value required" errors will issue.
> However, if:
> 1. some event change bean.disabled to false and trigger ppr with that
> input, and after that
> 2. some other event change bean.disabled back to true and ppr that
> inputText yet again
>
> then inputText will still be marked as required field on client, though it
> is disabled.
> It leads CSV to issue error in FF on disabled field and to "cannot focus
> disabled element" error in IE. Sadly, it renders whole form totaly unusable
> :(
> Am I missing some special configuration?
>
> Thanks.
>



-- 
Chordiant Software Inc.
www.chordiant.com