myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Torrefranca <storrefra...@branders.com>
Subject Re: <redirect /> and FacesMessage problem
Date Mon, 23 Apr 2007 20:19:09 GMT
i have thought of using a validator.  the only problem is that if the 
value is null, the validator isn't called.

the message needs to warn/remind user (does not give an error and let 
the user continue) that he/she has left these fields blank.  i cn't use 
required="true" either since we allow fields to be null and all we do is 
display the null values of the previous page.  It's weird I know but 
well.... <sigh>

therefore we do the validation on the event method and build the 
Messages there as we redirect the user to the next page.

-Steve


Garner, Shawn wrote:
> You can have application level messages and validation level messages.
>
> If you create a message in your application method you would expect it
> to display on the next page regardless of which page you navigate to.
>
> This is in contrast to a validation message which it must pass the
> validation phase.
>
> Shawn
>  
> -----Original Message-----
> From: Simon Kitching [mailto:simon.kitching@rhe.co.nz] 
> Sent: Monday, April 23, 2007 3:04 PM
> To: MyFaces Discussion
> Subject: Re: <redirect /> and FacesMessage problem
>
> Steve Torrefranca wrote:
>   
>> <t:messages /> suddenly stopped working after I used <redirect/>.  How
>>     
>
>   
>> do I keep FacesMessage's state if I use redirect?
>>     
>
> Why would you want to?
>
> If a page has error messages then navigation will not occur. If a page 
> does not have error messages, then "losing them" on navigation is not a 
> problem as there are none to lose.
>
> What scenario do you have that needs to preserve messages on navigation 
> via redirect?
>
>   


Mime
View raw message