[jboss-user] [JBoss Seam] - ScopeType.EVENT versus getter method actionBean.getProperty(

antispart do-not-reply at jboss.com
Thu Nov 30 15:19:50 EST 2006


Am I correct in my understanding that the following two are effectively the same? the property is outjected into event scope so it's called several times during the JSF request processing lifecyle, and so is the the actionBean.getProperty() method - and both have the same lifetimes?

ActionBean.java:
  | 
  | @Stateful
  | @Name("actionBean")
  | public class ActionBean implements ActionBeanLocal (
  | ....
  | public getProperty()
  |    return property();
  | }
  | 
  | ...
  | 
  | example.xhtml:
  | 
  | <h:outputText value="#{actionBean.getProperty}"/>

and 

ActionBean.java:
  | 
  | @Stateful
  | @Name("actionBean")
  | public class ActionBean implements ActionBeanLocal (
  | ....
  | @Out(scope=ScopeType.EVENT)
  | public getProperty()
  |    return property();
  | }
  | 
  | ...
  | 
  | example.xhtml:
  | 
  | <h:outputText value="#{property}"/>

When is one pattern preferable to the other?

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

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



More information about the jboss-user mailing list