[jboss-user] [JBoss Seam] - Re: Problems with navigations with null outcomes

fernando_jmt do-not-reply at jboss.com
Sun Feb 18 08:19:33 EST 2007


"gavin.king at jboss.com" wrote : The docs are correct, are you sure you are really observing this?


Yes, I am sure.

I have this in pages.xml

  | <page view-id="/user/new.xhtml" no-conversation-view-id="/user/list.xhtml">
  |         <navigation from-action="#{userManager.create}">
  |             <rule>
  |                 <redirect view-id="/user/list.xhtml"/>
  |             </rule>
  |         </navigation>
  |     </page>
  | 

And this in my create method:


  | public String create() {
  | 
  |       
  |         try {
  |             em.persist(user);
  |             em.flush();
  |             facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_INFO,
  |                     "Common.message.created", user.getFullName());
  |             return "userList";
  |         } catch (EntityExistsException e) {
  |       
  |            facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_ERROR, "User.error.duplicate");
  |             return Outcome.REDISPLAY;
  |         }
  |     }
  | 
  | 


And it doesn't work. I'm always getting the error messages (cause of EntityExistsException caught):
    * The username is already registered.
    * Transaction failed

in the list.xhml instead of the new.xhtml view.

I'm using 
tomcat 5.5.17
java 1.5.x
Seam 1.1.6GA CVS build at 02/12/2007


Any ideas why am I getting this behaviour?


Thanks.



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

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



More information about the jboss-user mailing list