This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ajax + jsf + viewstate

 
Anthony Taylor
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
http://ajax4jsf.dev.java.net/
[ January 01, 2007: Message edited by: Sergey Smirnov ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic