Sometimes I am getting ‘bugs’ that claim there is something wrong with the (Trinidad) framework, as its UIComponents are NOT serializable… An example:
java.io.NotSerializableException:
org.apache.myfaces.trinidad.component.UIXSwitcher
No, this is not a bug at all!
First:
Your (session/application/pageFlow scoped) backing beans should not have an UI component as its property… (if you really really need the “cool” binding attribute).
Second:
UIComponents are not serializable – for a good reason!
In JSF there is StateSaving (see the restore/saveState() hooks)….
Apache MyFaces Trinidad does have a tool that helps to store an reference to an UIComponent (instead of the component itself).
Here are a few blogs on that, that may give more information on the API and why the tool is there:
http://leadingyouastray.blogspot.com/2010/02/references-to-uicomponents-in-session.html
Have fun!