This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSF and the fly likes ajax + jsf + viewstate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "ajax + jsf + viewstate" Watch "ajax + jsf + viewstate" New topic

ajax + jsf + viewstate

Anthony Taylor

Joined: May 04, 2006
Posts: 26
I am trying to understand how to maintain viewstate between the client and the server when the viewstate is stored on the client. Since the page is initially loaded once, I think I would have to somehow pass the viewstate to the server on each request using javascript. Then, I would have to somehow receive the viewstate from the server and reset the viewstate on the client. Am I thinking correctly on this? Can anyone provide me with examples of how this should be done?
Sergey Smirnov
Ranch Hand

Joined: May 29, 2003
Posts: 167
yes, you are right. The state should travel to the server with each ajax request and each ajax response should contain the new state that should be send next time.
Just look at the source code of Ajax4jsf for details.
[ January 01, 2007: Message edited by: Sergey Smirnov ]
I agree. Here's the link:
subject: ajax + jsf + viewstate
Similar Threads
Clear the value of parameter 'javax.faces.ViewState'
MS 70-528 Johnsson Northrup Chpt 3 page 102
ViewState value
PLEASE HELP????? jsf + form population
NotSerializableException + jsf custom components