5 Replies Latest reply on Nov 12, 2009 2:13 AM by Franck Garcia

    SEAM with RichFaces Questions

    Franck Garcia Newbie

      Hi all,


      I'm new to SEAM and RichFaces. I would like to integrate a search capability in my current xhtml for a given field. I decided to display a modal panel after the user clicks a link near my field. In this modal pane, I would like to activate the search with a a:commandButton component but this doesn't work. The only way I get it work is with the a:support tag embedded in my search field (code here after).
      When I use my the ajax command button it seems that the search input field which is in the same region is not sent to the server. Any help would be greatly appreciated.


      working code:


           <rich:modalPanel id="modalPanel">
                <f:facet name="header">
                                    Modal panel
                                </f:facet>
                <f:facet name="controls">
                     <h:graphicImage value="/img/false.png" style="cursor:pointer"
                          onclick="#{rich:component('modalPanel')}.hide()" />
                </f:facet>
      
      
                <rich:panel>
                     <f:facet name="header">Search Filter</f:facet>
                          <h:inputText id="partyName" value="#{partyList.party.name}">
                               <a:support event="onblur" reRender="xxx" ajaxSingle="true" />
                          </h:inputText>
                </rich:panel>
      
                <rich:panel id="xxx">
                     <f:facet name="header">Party Search Results (#{empty partyList.resultList ? 0 :
       (partyList.paginated ? partyList.resultCount : partyList.resultList.size)})
                              </f:facet>
                     <h:outputText
                          value="The party search returned no results."
                          rendered="#{empty partyList.resultList}" /> 
                          
                          <rich:dataTable
                          id="partyListGrid" var="_party" value="#{partyList.resultList}"
                          rendered="#{not empty partyList.resultList}">
                          <h:column>
                               <h:outputText value="#{_party.id}" />
                          </h:column>
                          <h:column>
                               <h:outputText value="#{_party.carrierCode}" />
                          </h:column>
                     </rich:dataTable>
                </rich:panel>
      
                <a href="#" onclick="#{rich:component('modalPanel')}.hide()">Done</a>
           </rich:modalPanel> 




      refuse to work:


                ......(same code)
                      <rich:panel>
                     <f:facet name="header">Search Filter</f:facet>
      *               <a:region>
      *                    <h:inputText id="partyName" value="#{partyList.party.name}">
                          </h:inputText>
      **                    <a:commandButton ajaxSingle="true" reRender="xxx" value="Search"/>
      *               </a:region>
      *          </rich:panel>
                      (same code)......