That's what even I thought but may be I'm doing something wrong.

Here is the simple code I'm trying to run but it does not seem to work with 
event scope. Both category and id are always null unless I change the scope of 
categoryAction to session. Could you spot anything wrong with this approach? 
Thanks


  | @Name("home")
  | Class Home
  | {
  | private String category;
  | 
  | public getCategory()
  | {
  |     if (null == category)
  |           category = new String("Testing Event Scope");
  |     return category;
  | }
  | }   

home.xhtml: 
  | <h:commandLink action="#{categoryAction.action}" value="#{home.category}"> 
  | <f:param name="category" value="#{home.category}" />
  | </h:commandLink>
  | 


  | @Name(categoryAction)
  | @Scope(ScopeType.Event)
  | Class CategoryAction
  | {
  | @RequestParameter("category")
  | private String category;
  | 
  | public String getId()
  | {
  |     if (null == id)
  |        System.out.println("id is null");
  |     return Id;
  | }
  | 
  | public String getCategory()
  | {
  |      if (null == category)
  |         System.out.println("category is null");
  |      return category;
  | }
  | 
  | public void setCategory(String category)
  | {
  |        this.category = category;
  | }
  | 
  | public String action()
  | {
  | this.id = 1;
  | return "category.xhtml"
  | }
  | }   

category.xhtml:
  | 
  | <h:outputText value="categoryAction.id" />
  | <h:outputText value="categoryAction.category" />

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044881
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to