I'd like to use saveState to avoid having to use hidden vars on a form... <h:inputText value="#{employeeAction.employee.name}"/> <h:inputText value="#{employeeAction.employee.id}"/> <--- use saveState instead?
EmployeeAction has a reference to Employee: <managed-bean> <managed-bean-name>employeeAction</managed-bean-name> <managed-bean-class>net.reumann.EmployeeAction</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> <managed-property> <property-name>employeesListBean</property-name> <value>#{employeesListBean}</value> </managed-property> <managed-property> <property-name>employee</property-name> <value>#{employee}</value> </managed-property> </managed-bean> I have both EmployeeAction and Employee implementing Serializable. I've tried <x:saveState id="employeeAction" value="#{employeeAction}"/> and <x:saveState id="employee" value="#{employeeAction.employee}"/> I'm having difficulty getting saveState to work. Any tips much appreciated. Things work fine if use the hidden vars.