myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Perlik" <adam.per...@gmail.com>
Subject Re: MyFaces 1.1.5 Strange validation behaviour
Date Thu, 07 Feb 2008 12:08:57 GMT
Sorry for not being explicit

by enter I ment navigating there by actions. When I'm on the page
clicking refresh in browser causes the same behaviour - sometimes the
correct value is shown, and sometimes the rejected one.

Regards
Adam

2008/2/7, Martin Marinschek <martin.marinschek@gmail.com>:
> I do not understand this part of your question:
>
> >Although I entered correct value, when I enter the same page I get the
> >wrong value in some sort of cycles (sometimes it's once per five
> >reloadas, sometimes it's 3/3).
>
> what means "enter"? You click refresh? back-button? You navigate there
> with an action?
>
> regards,
>
> Martin
>
> On 2/7/08, Adam Perlik <adam.perlik@gmail.com> wrote:
> > Hi,
> >
> > and there's also behavior like this:
> > 1. I enter wrong value
> > 2. Validator rejects the value and a message is shown
> > 3. I enter correct value and save
> >
> > Although I entered correct value, when I enter the same page I get the
> > wrong value in some sort of cycles (sometimes it's once per five
> > reloadas, sometimes it's 3/3).
> >
> > The input is declared in jsp like this:
> >
> > <h:inputText id="element_volume"
> >   value="#{element.editElement.volume}" required="true">
> >     <f:validateLongRange minimum="0" maximum="999999"/>
> > </h:inputText>
> >
> > the #{element} backing bean is request scoped and managed by spring.
> >
> > Are validators in JSF statefull ?
> > I wonder what makes the wrong data to show up.
> >
> > 2008/2/7, Adam Perlik <adam.perlik@gmail.com>:
> > > Hi,
> > >
> > > no, there are no binding attributes for input elements. I'm preatty
> > > sure it's because the use of "cancel" command button with
> > > immediete="true" set on.
> > >
> > > I just can't figure out why is myfaces showing those two values in
> > > some sort of cycles - it would be normal if it showed the wrong value,
> > > as the one which gets set when I bypas validation by immediete="true".
> > >
> > > regards
> > > Adam
> > >
> > > 2008/2/6, Martin Marinschek <martin.marinschek@gmail.com>:
> > > > Hi Adam,
> > > >
> > > > do you use component-binding with a session-scoped bean?
> > > >
> > > > regards,
> > > >
> > > > Martin
> > > >
> > > >
> > > > On Feb 5, 2008 8:04 PM, Adam Perlik <adam.perlik@gmail.com> wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > I have a jsp page with text input on it and a long range validator
(0
> > > > > to 999999) connected with that field.
> > > > > Now I run the following scenario:
> > > > > 1. enter invalid value (-123)
> > > > > 2. submit by command button
> > > > > 3. Proper validator message is displayed and everything seems to
work
> > fine
> > > > > 4. I cancel the page by hitting another command button with
> > > > > immediete='true' set, and it takes me to another page
> > > > >
> > > > > After those actions whenever I enter the page I see the good value
of
> > > > > the input field or the invalid one that was rejected by the validator.
> > > > > The order seems totaly random, sometimes it's in cycles of 3 (3 times
> > > > > good value, 3 times bad).
> > > > >
> > > > > Maybe somebody has seen something like this or has some Ideas what
to
> > > > > debug. The model i backing beans is ok and has proper values.
> > > > >
> > > > > Thanks in advance
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > http://www.irian.at
> > > >
> > > > Your JSF powerhouse -
> > > > JSF Consulting, Development and
> > > > Courses in English and German
> > > >
> > > > Professional Support for Apache MyFaces
> > >
> >
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>

Mime
View raw message