On Thu, 2007-08-23 at 08:33 -0600, Ken McArthur wrote:
> 
> With client state saving, I was under the impression that only managed
> beans in session scope or used in t:saveState would be serialized into
> the hidden javax.faces.ViewState variable.  However, my application's
> creating ViewStates in pages with very simple forms that are almost 70
> kb long! 
> 
> I'm thinking that if I serialized all managed beans in all scopes +
> resource bundle, it might come to about that.
> 
> Do you know what specifically is stored in ViewState?  Put in other
> words, what is best way to architect application to minimize size of
> ViewState while still using client state saving? 

Hmm..puzzling. All that is stored in the viewstate is the internal
properties of the JSF components attached to the current UIViewRoot.
Nothing from the http session gets included, unless you use t:saveState
to explicitly attach an object to the JSF component tree.

JSF components do all support an arbitrary map of attributes that user
data can be stored in. I think this will cause it to also be saved.
Perhaps you have some code that stores an object into the attribute map
of a JSF component?

I think a JSF text edit component would have the current contents of the
textbox as state, which might be reasonably large. But then so would the
html page as it also has the state.

Large html tables might be a bit bulky. The actual objects that the row
data is taken from are not stored, but there is a bit of state info
about each row that gets kept.

Other that that, nothing occurs to me.

I can't initially think of an easy way to narrow the problem down
either...

Regards,

Simon

Reply via email to