5 Replies Latest reply on Mar 7, 2011 11:15 AM by Nick Belaevski

    control ajax programmatically

    Dave Chen Master

      ajaxkeys can be used to reRender part of rich:dataList.

       

      <h:form>

      .......

       

           <a4j:commandButton action="#{carBean.updateCarPrice}" reRender="price" value="Submit"/>

       

           <rich:dataList var="car" value="#{carBean.listOfCars}" id="list"

                rows="6" type="disc" ajaxKeys="#{carBean.keyToUpdate}">

               

                <h:outputText id="price" value="#{car.price}" />

       

           </rich:dataList>

                         

       

      </h:form>

       

       

      I am wondering if there is a way to tell ajax4Jsf to render the specific rows of rich:dataList on server side programmatically.

      can i AjaxContext to add components? 

       

      <a4j:commandButton action="#{carBean.updateCarPrice}"  value="Submit"/>

       

           <rich:dataList var="car" value="#{carBean.listOfCars}" id="list"

                rows="6" type="disc" ajaxKeys="#{carBean.keyToUpdate}">

               

                <h:outputText id="price" value="#{car.price}" />

       

           </rich:dataList>

       

      keeping the ajaxKeys, removing reRender from the button action and adding "price" to ajaxContext did not work. I hope

      to control ajax programmatically on server side, not in jsf page.

       

      Thanks

      Dave