[jboss-user] [JBoss Seam] - Losing web page state on validation error with HibernateEnti

jcelano@netkey.com do-not-reply at jboss.com
Fri Oct 26 14:53:43 EDT 2007


I am using Seam 2.0 CR4 with Jboss 4.2 and Hibernate and my applications is deployed as a WAR.  

I have a simple page (startPage.xhtml) that links to another page (userInfo.xhtml) that is backed by a HibernateEntityHome object (UserHome.java).  When i first navigate to the userInfo page, all works as desired.  The user information is loaded and it appears that the entity is managed (e.g. the update button is displayed, not the add button).  

My problem is this, if there is a validation error (e.g. phone number not the correct format), then it appears that the entity is not managed anymore (e.g. the add button is displayed instead of the update button).  What am i doing wrong?

Any help would be appreciated.  If you need more information or code, please let me know.

Pages.xml snip...

  |   <page view-id="/userinfo.xhtml" login-required="true">
  |      <param name="id" value="#{userHome.id}"/>
  |         <navigation>
  |            <rule if-outcome="created">....</rule> 		
  |         </navigation>   	
  |     </page>
  |  

Link snip....

  | <h:outputLink value="userinfo.seam">
  |    <f:param value="#{user.id}" name="id"></f:param>
  |     User - Edit Current User			
  | </h:outputLink>
  | 

UserInfoHome.java snip....

	
  | 	@RequestParameter
  | 	protected Integer id;
  | 	public Integer getId() {
  | 		log.info("getId() called id={0}", id);
  | 		return id;
  | 	}
  | 
  | 
  | 	public void setId(Integer netkeyEntityId) {
  | 		log.info("setId() called id={0}, netkeyEntityId={1}", id, netkeyEntityId);
  | 		id = netkeyEntityId;
  | 	}
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099469#4099469

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099469



More information about the jboss-user mailing list