>From: "Dan Diodati" [EMAIL PROTECTED] >When creating custom UI Component you have to implement the saveState and >restoreState methods. >I'm just curious the reason for this, since couldn't the jsf state mangement >handle serializing a > UIComponent(assuming it implements serializable) using java's object > serializing support? > >I just want to know why it was done this way since it seems to be more complex >then it needs to be? >
I suspect that one reason the entire component was not just serialized was an attempt to minimize the footprint when using client side state saving. Some component are marked as transient. The verbatim component is an outputText component that is transient. This means that it doesn't save state in the component tree resulting in a smaller client state footprint. Components are snapped together in a tree. If you serialize the root, it would be hard to exclude child components. It also opens doors for other state saving mechanisms. A custom implementation might better address the partial page rendering paradigm. >Dan Gary
