Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 25713 invoked from network); 23 Apr 2007 20:22:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Apr 2007 20:22:28 -0000 Received: (qmail 88531 invoked by uid 500); 23 Apr 2007 20:22:30 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 88500 invoked by uid 500); 23 Apr 2007 20:22:29 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 88483 invoked by uid 99); 23 Apr 2007 20:22:29 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Apr 2007 13:22:29 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [203.177.138.106] (HELO outbox01.branders.com) (203.177.138.106) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Apr 2007 13:22:20 -0700 Received: from mnlmail02.branders.com ([10.16.1.43]) by outbox01.branders.com (8.13.1/8.13.1) with ESMTP id l3NKLwkC017119 for ; Mon, 23 Apr 2007 13:21:58 -0700 Received: from [10.16.3.132] ([10.16.3.132]) by mnlmail02.branders.com (8.13.4/8.13.1) with ESMTP id l3NKLwQn017056 for ; Mon, 23 Apr 2007 13:21:58 -0700 Message-ID: <462D14BD.9080208@branders.com> Date: Mon, 23 Apr 2007 13:19:09 -0700 From: Steve Torrefranca User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: MyFaces Discussion Subject: Re: and FacesMessage problem References: <462D01B7.6090000@branders.com> <462D1149.70002@rhe.co.nz> In-Reply-To: Content-Type: multipart/alternative; boundary="------------030303080408030303060200" X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. --------------030303080408030303060200 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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.... 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: and FacesMessage problem > > Steve Torrefranca wrote: > >> suddenly stopped working after I used . 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? > > --------------030303080408030303060200 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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?

  

--------------030303080408030303060200--