0 Replies Latest reply on Nov 6, 2008 11:41 AM by sambolino

    a4j:repeat question

    sambolino

      hello

      i have a search form and after hitting a button, part of a page is rerendered and results are shown. however, i have a problem with a4j:region:

      <h:panelGrid columns="2">
       <a4j:region id="region">
       <a4j:commandButton reRender="searchResults"
       value="search" action="#{myBean.search}"/>
       </a4j:region>
       <a4j:status for="region">
       <f:facet name="start">
       <h:graphicImage value="img/ajax-loader.gif" />
       </f:facet>
       </a4j:status>
       </h:panelGrid>



      public void search() {
       UIViewRoot root = FacesContext.getCurrentInstance().getViewRoot();
       Date tempDate = (Date) ((HtmlCalendar) root
       .findComponent("frmMain:ReceivedDecorate:itReceivedFrom"))
       .getValue();
       // etc


      it doesn't work this way and tempDate is always null. If i remove a4j:region tag, it does work but other ajax requests on the page trigger ajax status, as expected. is there a solution to this?

      regards, veljko