When using a SFSB with SESSION scope, do you have to use a @Begin annotation?

I have the following jsp page:<%@ page language="java" %>
  | <%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h" %>
  | <%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f" %>
  | <p>Page 1 </p>
  | <f:view>
  | <h:form>    
  |     <h:messages />
  |     <h:commandButton action="#{sfsbSession.fillTable}" value="Fill table"/>
  |     <h:dataTable var="row" value="#{myTable}">
  |             <h:column>
  |                     <h:commandButton value="Go to page 2" 
action="#{sfsbSession.goToPage2}"/>
  |             </h:column>
  |             <h:column>
  |                     <h:outputText value="#{row}"/>
  |             </h:column>
  |     </h:dataTable>
  |     <h:commandButton value="Go to page 2" 
action="#{sfsbSession.goToPage2}"/>
  | </h:form> 
  | </f:view>
  |  and the following SFSB with session scope:
@Stateful
  | @Name("sfsbSession")
  | @Intercept(InterceptionType.ALWAYS)
  | @Interceptor(SeamInterceptor.class)
  | @Scope(ScopeType.SESSION)
  | public class SFSBSessionAction implements SFSBSession, Serializable {
  | 
  |     private static final long serialVersionUID = -8231478684900323568L;
  |     
  |     @DataModel private List<String> myTable;
  | 
  |     //@Begin
  |     public String fillTable() {
  |             myTable = new ArrayList<String>();
  |             myTable.add("item1");
  |             myTable.add("item2");
  | 
  |         return "page1";
  |     }
  | 
  |     public String goToPage2() {return "page2";}
  | 
  |     @Destroy @Remove
  |     public void destroy() { }
  | }
  | 
When I click on the commandButton below the dataTable, the goToPage2 method in 
my SFSB is invoked and I get page2. However, when I click on the commandButton 
inside the dataTable, nothing is invoked and page1 is returned with an empty 
dataTable.

When I uncomment the @Begin annotation at the fillTabel method, everything 
works fine though.

Is this the normal behaviour? Why?

I'm using myfaces (nightly build version 12-13-2005), jBoss 4.0.3SP1 and seam 
beta1.

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

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


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to