Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

General question: Where to save UI state ?

843842Sep 23 2003 — edited Sep 24 2003
Hello,

after some discussion about not-rendering components and validation I want to ask a general question:

It was said, that a new component tree will be built every time I navigate to another jsp page.
Also that a component tree will be rebuilt and reused when the response leads back to the same page.

When I left a jsp by navigating to another and I return, all changes I have made are lost because: the component tree was thrown away and default values apply from the jsp tag attributes.

So if the User changed the web gui before, his/her configuration will be lost. Therefore I think, you have to save the state in which the component tree was, when you left the page. A good example would be a wizard. The User can navigate forward and backward and want his gui find again in the same state as he left it.

I saw that it's possible to save state in client by submitting the component tree in a hidden input tag. I used it and encountered problems with multiple forms.

Is the approach by saving state of UI in client the answer to the mentioned problem ?

In my opinion in a framework that intents to run the UI completely on the server, this also should be done by the server.

I am interested how the problem would be addressed on server-side. Would the FacesContext hold a history of trees? How about a mechanismen that saves attributes of components (related to the corresponding jsp) for easy recover ?

What do you think about this issue ?

Thank you,

Rene
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 22 2003
Added on Sep 23 2003
4 comments
90 views