I'm having the problem I thought I had, second click on the command button 
calling an action with @Begin(join=true) gets a new conversation id.

And I was wrong about the action not getting invoked with the seam ui 
components, they just don't seem to go through the usual jsf lifecycle (don't 
get the printouts from my timer phase listener).

Here is some more code, can you guys see anything wrong?

  | @Name("dataSearch")
  | @Scope(ScopeType.CONVERSATION)
  | public class DataSearch {
  | 
  |     private String pattern;
  | 
  |     @In("#{DataService}")
  |     private DataService dataService;
  | 
  |     boolean onlyColl = false;
  |     boolean withPrivate= false;
  |     List<Data> results;
  | 
  | 
  |     @Begin(join=true)
  |     public String search(){
  |         System.out.println("Conversation id in action: " 
+Conversation.instance().getId());
  |         if(results == null){
  |             System.out.println("results is NULL");
  |             results = dataService.getData(pattern, onlyColl, withPrivate);
  |         }
  | 
  |         return null;
  |     }
  | //cut
  | 
  | 

And here is the XHTML body content :

  | 
  |             #{conversation.id}
  | 
  |             <h:form>
  |                     Search pattern:
  |                     <h:inputText value="#{dataSearch.pattern}"/>
  |                     <s:link value="SeamLinkSearch" 
action="#{dataSearch.search}"/>
  |                     <s:button value="SeamButtonSearch" 
action="#{dataSearch.search}"/>
  |                     <h:commandButton action="#{dataSearch.search}" 
value="search"/>
  |                     <a4j:commandButton action="#{dataSearch.search}" 
value="ajax search" reRender="searchResult"/>
  |                     <a4j:status startText="Working..." stopText=""/>
  | 
  | 
  |                     <rich:dataTable
  |                             id="searchResult"
  |                             rendered="#{not empty dataSearch.results}"
  |                             value="#{dataSearch.results}"
  |                             var="row"
  |                             rows="10">
  |                 <f:facet name="header">
  |                                     <rich:datascroller for="searchResult"/>
  |                             </f:facet>
  |                             <rich:column>
  |                                     <f:facet name="header">
  |                                             Code
  |                                     </f:facet>
  |                                     #{row.code}
  |                             </rich:column>
  |                             <rich:column>
  |                                     <f:facet name="header">
  |                                             Name
  |                                     </f:facet>
  |                                     #{row.name}
  |                             </rich:column>
  |                     </rich:dataTable>
  | 
  |                     <rich:messages showDetail="true"/>
  |             </h:form>
  | 
  | 

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

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

Reply via email to