dev@jsftemplating.java.net

Re: JSFTemplating: How to make text fields remember old values

From: Ken Paulsen <Ken.Paulsen_at_Sun.COM>
Date: Thu, 05 Apr 2007 11:19:18 -0700

Hi Karam,

Do you mean the browser back button? If so, I think the fields should
still be there (depending on which browser you use... I think firefox
leaves them, IE might not).

If you mean a button on the page that you've added to "navigate" back to
the prior page, then you are correct the values will be lost. You can
overcome this by binding to session (the values may live longer than you
expected... you'll have to be careful as to "when" to clean these up),
or by passing the values from the page you are navigating from. In
other words, you passed the data from A -> B... then you navigate from B
-> A, you also need to pass the values. You can use a handler in a
"command" event to move pageSession or requestParameter values to the
appropriate place.

Good luck!

Ken

Karam Singh Badesha wrote:
> Hi,
> I have a for where I have couple of text fields. When a user enters the
> information in the form, another result page is shown. Now if a user
> clicks back to get to the previous form page, all the data in the fields
> is lost. Currently all the textfields values are pageSession variables.
>
> thanks,
>