Hi Jeffrey,

I'm finally using a workaround based on the "redirect after post" pattern that consists of:

1) Always navigating using redirects in my navigation rules --> This solves the problem with refreshing and shows the correct URL on the browser (if not used, you always get the previous URL)
2) The problem with using redirect is that information is lost within the redirect process, like Faces messages (amongst maybe others). I posted a listener to avoid this problem.
3) In order to solve the problem with the back button, and always in combination with the redirect navigation, you can always include an script in the very first beginning of your page that does this simple function:

<script>
history.forward();
</script>

Hope it helps ;-)

2005/11/22, Jeffrey Porter <[EMAIL PROTECTED]>:

Anyone?

 

-----Original Message-----
From: Jeffrey Porter [mailto:[EMAIL PROTECTED]]
Sent: 21 November 2005 12:06
To: MyFaces Discussion
Subject: HTTP re-post - another question.

 

 

Hello all,

 

I know similar things have been asked before, but I've not seen a conclusive conclusion.

 

Problem:

 

I have a page with a bean on, when the page is submitted; the back end saves the bean & binds a new instance of the bean to the page.

So that the fields are re-displayed as empty.

 

BUT

 

When I press F5 at this point, my page is re-submitted & I get a Bean with the original values in, not an empty bean.

 

I've seen people talk about the "redirect after post" pattern.

 

Is this the correct path to follow? Or can I just make a call to removed the data when I redirect back to my original page?

 

Jeff.

 


Reply via email to