• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NotSerializableException + jsf custom components

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Anthony Taylor
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
reply
    Bookmark Topic Watch Topic
  • New Topic