[prev in list] [next in list] [prev in thread] [next in thread] 

List:       myfaces-user
Subject:    RE: resetting a form
From:       "Korhonen, Kalle" <kkorhone () cisco ! com>
Date:       2005-04-29 17:48:56
Message-ID: BA7F50A400AF53449809C74ECDB4A79B010E5293 () vtg-um-e2k4 ! sj21ad ! cisco ! com
[Download RAW message or body]

> -----Original Message-----
> From: Vincent SEVEL [mailto:VSEVEL@sqli.com] 
> Subject: RE: resetting a form
> The only problem with this approach is that if you have 
> validation rules that apply to some of the fields you are 
> trying to reinit, you will not be able to get to your init() 
> method (invoke phase), assuming that at least 1 validation fails. 

Yeah, good point. In your latter email you correctly point out that you
could just navigate back to the same view without executing any actions,
and thus re-initializing the bean (assuming its request scoped) and
re-creating the view.

However, if the bean's not request scoped you might need to do
*something* to get it to reset. I wonder if you could somehow take care
of the fact that null component values are not validated, i.e. mark the
view or some aggregate component as not rendered or something similar.
Don't have this problem right now, so not thinking any further than
that, but might give somebody some ideas to think about.

Kalle

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic