I've simplified my code and tried everything i can but still no luck. Here is 
my code list in full

MyStuffAction.java

  | @Stateful
  | @Name("myStuff")
  | @Scope(CONVERSATION)
  | public class MyStuffAction implements MyStuff
  | {
  | 
  |     @In(required=false,scope=ScopeType.CONVERSATION)
  |     @Out(required=false,scope=ScopeType.CONVERSATION)
  |     private String name;
  |     
  |     @Begin
  |     public String sayHello()
  |     {
  |         name="James";
  |         System.out.println("Hello:"+name);
  |         
  |         return null;
  |     }
  | 
  |     public String sayBye(){
  |         System.out.println("Bye:"+name);
  |         
  |         return "main";
  |     }
  |     @Destroy
  |     @End
  |     @Remove
  |     public String end()
  |     {
  |         return null;
  |     }
  | 
  | }
  | 

pages.xml

  | <pages>
  |     <page view-id="/mypage.xhtml" action="#{myStuff.sayHello}" />
  | </pages>
  | 

mypage.xhtml

  | <body id="pgHome">
  | <h:form>
  |     <div id="document">
  | 
  |     <div id="container">
  |     <div id="sidebar">
  |     <h:commandButton action="#{myStuff.sayBye}" value="sayBye"  />
  |     
  |     </div>
  | </div>
  | 
  |     </div>
  | </h:form>
  | </body>
  | 

Here is what I get from console(name is null when sayBye is invoked):
Hello:James
Bye:null

Is there anything I'm doing wrong?

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

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


_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to