[jboss-user] [JBoss Seam] - renew the @Factory

srpantano do-not-reply at jboss.com
Wed Sep 5 12:41:40 EDT 2007


I´m trying to make a page to insert data and when submitted it returns to the same page insert other one. But when return the object has the data of previous object. 
The object was created by @Factory:

  | @Factory("license")    
  | public License work() {
  |     return getInstance();
  | }

When submit the action method do:

  | public String persistAndContinue(){
  |     super.persist();
  |     setInstance(new License());
  | }

The getInstance has a new License object but the "license" still has the previous data.

How to do this correct?


Ps.: I´m using Jboss Framework
       The code of pages.xml is 

  | <navigation from-action="#{licenseHome.persistAndContinue}">
  |     <end-conversation/>
  |     <redirect view-id="/license/add.xhtml"/>
  | </navigation>

thanks for help.

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

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




More information about the jboss-user mailing list