[jboss-user] [JBoss Seam] - Re: Scoping - finding the sweetspot

petemuir do-not-reply at jboss.com
Wed Apr 25 06:43:04 EDT 2007


Not quite the same - @Create on a PAGE scoped component will be run when the view is accessed from another view (but not when it is refreshed/reloaded), a page action will be run each time it is accessed/refresed etc.

As for your original question: I would suggest something like


private Integer storedId;
  | 
  | @RequestParameter
  | private Integer id;
  | 
  | public int getId() {
  |    if (id !=null) {
  |       storedId = id;
  |    }
  |    return id;
  | }

You'll want to adjust the algorithm a bit so its suits your exact architecture. As your bean is in PAGE scope, storedId will be remembered

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

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



More information about the jboss-user mailing list