I seem to receive a NotSerializableException whenever I try to make a request to a jsf page I recently developed. I began to notice this problem when I changed the STATE_SAVING_METHOD to client in the web.xml file. The exception seems to be pointing to a textbox custom component we developed. Do custom components need to implement Serializable? Maybe I am confused about how storing information on the client occurs, but if someone could shed some light on what could be going on here, it would be greatly appreciated?
Joined: Oct 08, 2006
When setting the state saving to client, then all objects have to be serialized before being saved into the rendered HTML page. And yes, your custom component have to implement Serializable then.
This consumes more network bandwidth and less server memory. When setting the state saving to server, then the objects used won't be saved into the rendered HTML page. This consumes less network bandwidth and more server memory. My suggestion is to use the server side state saving. [ December 25, 2006: Message edited by: Bauke Scholtz ]
I need to use these components in an ajax-enabled web site. I think the viewstate needs to be saved to the client in order to keep the viewstate current across multiple requests. I found information on how to pass the viewstate along to a .jsf page. Do you have any information on how to persist the viewstate peristent across multiple requests?