File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes get the ViewState Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "get the ViewState" Watch "get the ViewState" New topic

get the ViewState

Rainer Zufall

Joined: Aug 08, 2012
Posts: 2
How can I retrieve the ViewState before it is sent to the client?
I know how to get the ViewState from a request.
I have an ajax-enabled webapp and I would like to know how I can get the ViewState when the user enters webapp with a GET-request. Can I get the ViewState in RenderResponse-phase before the response is sent to the client?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17260

Any time you try to solve a JSF problem by digging into JSF internals, the probability is that you are doing it wrong. JSF is designed to make things simple.

Also, any time you use a fictitious display name, you incur the wrath of the Powers that Be. We don't have many rules here at the JavaRanch, but one we are most insistent on is that people use real names. For details:

A real display name will get you a real answer.

An IDE is no substitute for an Intelligent Developer.
Rainer Zufall

Joined: Aug 08, 2012
Posts: 2
I found one way:
I agree. Here's the link:
subject: get the ViewState
It's not a secret anymore!