What is viewstate in JSF, and how is it used?

Posted by MatthieuF on Stack Overflow See other posts from Stack Overflow or by MatthieuF
Published on 2010-05-26T07:02:25Z Indexed on 2010/05/26 7:41 UTC
Read the original article Hit count: 294

Filed under:
|
|
|

In JSF, there is a viewstate associated with each page, which is passed back and forth with submits etc.

I know that viewstate is calculated using the states of the various controls on the page, and that you can store it either client side or server side.

The question is: how is this value used? Is it used to validate the values sent at submit, to ensure that the same request is not sent twice?

Also, how is it calculated - I realise that richfaces may be calculated differently from myfaces, but an idea would be nice.

Thanks.

© Stack Overflow or respective owner

Related posts about java

Related posts about jsf