On 4/27/06, John Ruffin <[EMAIL PROTECTED]> wrote:
I want users to flow through say 2 screens then I want to save their submitted data. I use t:saveState to keep the data around.I added: <t:saveState id="saveHierachy" value="#{parentForm}"/> to the first form and <t:saveState id="saveHierachy" value="#{divisionForm}"/> in the second form. Both beans implement Serializable. <t:saveState> is outside <f:view>. javax.faces.STATE_SAVING_METHOD is set to client. This works ok if I only want to display data on screen. (i.e. I can display data submitted in parentForm.jsp on divisionForm.jsp. But I want to save when divisionForm is submitted. So, I created a managed-bean of type Parent (a domain class) - called baseParent like this: <managed-bean> <managed-bean-name>baseParent</managed-bean-name> <managed-bean-class>com.jruffin.model.Parent</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> </managed-bean> This gets injected into divisionForm like this: <managed-bean> <managed-bean-name>divisionForm</managed-bean-name> <managed-bean-class>com.jruffin.web.DivisionForm</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> ... <managed-property> <property-name>parent</property-name> <value>#{baseParent}</value> </managed-property> </managed-bean> But in divisionForm.java the injected parent attributes are null. How do I populate #{baseParent} with t:saveState parent object/values?
Hey John, I'd like to answer your question, but I don't quite undersatnd what you're asking for. t:saveState should preserve all properties of a bean, including references to another bean, provided you've implemented Serialization (or Stateholder) correctly.

