Sorry I think I misstated the problem, and got mixed up from a different problem I am having.
I have a page that edits a bean, and at the bottom of the page the user can submit the bean to save to the database. Or the user can delete the bean. Then a message "XXX has been deleted successfully." is displayed to the user. Our application has breadcrumbs but the problem exists when a user reloads a page by pressing the refresh button. Previously when the user would reload the page the application would attempt to delete the item again, so I read online and it said that I should use a redirect. When I do that, it no longer performs the action to get to that page but the "XXX has been deleted successfully." is still displayed to the user. I used a debugger to verify that it does not go into the action after the redirect. But this error message is misleading to the user. Thanks Kal On 2/5/07, Jay Balunas <[EMAIL PROTECTED]> wrote:
Hello Kal, I trying to understand you issue a little more. You have something like a login page that upon successful login redirects to another page? If there is an error it is displayed on the login page? But if the use has invalid login information entered, but clicks a command button to navigate to another page the error still displays on the new page? Is the error caused by a validator/converter, or with-in an action method? Because this type of functionality is alot like a "cancel" button - you want it to navigate, but not process validations. This myfaces wiki page talks about one solution ( wiki )<http://wiki.apache.org/myfaces/How_The_Immediate_Attribute_Works>Using the immediate attribute on command components. -Jay On 2/2/07, kal stevens <[EMAIL PROTECTED]> wrote: > > I have a page that is redirected in faces-config.xml file > > And my problem is that on this page, if the user gives an invalid input > there is an error message. > I would like it if when the user refreshes the page (or hits a back > breadcrumb) if that error message was not displayed again. > > Is there a better way to do this? > The page can not resubmit the action, so I had to do a redirect. > > Thanks > > Kal >