日期:2014-05-16  浏览次数:20392 次

JSF中关于javax.faces.STATE_SAVING_METHOD的一个问题?

看<JSF in Action>里讲JSF的生命周期时,有下面一段:
A view represents all of the components that make up a particular page. It can be
stored on the client (usually in a hidden field on a browser) or on the server (usu-
ally in the session).

意思是说:"在JSF中,一个视图代表着组成整个特定页面的组件,它可以被存储在客户端(通常以隐藏域的方式存在浏览器中),也可以存储到服务器上(通常以Session的方式.)"


存放在服务器上的情况先不考虑,对存放到client端的方法有些疑问,我看了下生成HTML的代码,其中是有一个element,它的内容如下:
?? ?<input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="rO0ABXVyABNbTGphdmEubGFuZy5PYmplY3Q7kM5YnxBzKWwCAAB4cAAAAANzcgBHb3JnLmFwYWNoZS5teWZhY2VzLmFwcGxpY2F0aW9uLlRyZWVTdHJ1Y3R1cmVNYW5hZ2VyJFRyZWVTdHJ1Y3RDb21wb25lbnRGWRfYnEr2zwIABFsACV9jaGlsZHJlbnQASltMb3JnL2FwYWNoZS9teWZhY2VzL2FwcGxpY2F0aW9uL1RyZWVTdHJ1Y3R1cmVNYW5hZ2VyJFRyZWVTdHJ1Y3RDb21wb25lbnQ7TAAPX2NvbXBvbmVudENsYXNzdAASTGphdmEvbGFuZy9TdHJpbmc7TAAMX2NvbXBvbmVudElkcQB+AARbAAdfZmFjZXRzdAATW0xqYXZhL2xhbmcvT2JqZWN0O3hwdXIASltMb3JnLmFwYWNoZS5teWZhY2VzLmFwcGxpY2F0aW9uLlRyZWVTdHJ1Y3R1cmVNYW5hZ2VyJFRyZWVTdHJ1Y3RDb21wb25lbnQ7uqwnyBGFkKoCAAB4cAAAAAFzcQB+AAJ1cQB+AAcAAAAgc3EAfgACcHQAKWphdmF4LmZhY2VzLmNvbXBvbmVudC5odG1sLkh0bWxPdXRwdXRUZXh0dAAHX2lkSnNwMHBzcQB+AAJwcQB+AAx0AAdfaWRKc3AxcHNxAH4AAnB0AChqYXZheC5mYWNlcy5jb21wb25lbnQu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