aspose file tools*
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 Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "ajax + jsf + viewstate" Watch "ajax + jsf + viewstate" New topic
Author

ajax + jsf + viewstate

Anthony Taylor
Greenhorn

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.
http://ajax4jsf.dev.java.net/
[ January 01, 2007: Message edited by: Sergey Smirnov ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ajax + jsf + viewstate
 
Similar Threads
MS 70-528 Johnsson Northrup Chpt 3 page 102
NotSerializableException + jsf custom components
PLEASE HELP????? jsf + form population
ViewState value
Clear the value of parameter 'javax.faces.ViewState'