2 Replies Latest reply on Jul 8, 2011 6:30 AM by Kevin Farrell

    a4j:param inside rich:list not getting set

    Kevin Farrell Newbie

      Hi,

       

      I'm fairly new to JSF so hopefully what I'm trying to do makes sense!

       

      I have the following button and it works fine. Parameter is set in the bean and the render is called correctly.

       

      <a4j:commandButton value="B000002" id="kev" render="caseDetailsPane">

            <a4j:param value="B000002" assignTo="#{myCasesService.selectedCustomerNumber}" />

      </a4j:commandButton>

       

      However if I put this inside a rich:list it no longer works. The render is still called but the parameter is not getting set in the bean:

       

      <rich:list value="#{myCasesService.caseDetailsList}" id="myCasesList"

                                     var="caseDetails">                           

                             

                                  <a4j:commandButton value="B000002" render="caseDetailsPane">

                                      <a4j:param value="B000002" assignTo="#{myCasesService.selectedCustomerNumber}" />                               

                                  </a4j:commandButton>                           

       

      </rich:list>

       

      Any help would be greatly appreciated?

       

      Regards,

      Kevin.

        • 1. Re: a4j:param inside rich:list not getting set
          Nick Belaevski Master

          Hi Kevin,

           

          Can you please try adding action method and checking if it's being called?

          • 2. Re: a4j:param inside rich:list not getting set
            Kevin Farrell Newbie

            Ok so I got it working by changing it to the following:

             

            <rich:list value="#{myCasesService.caseDetailsList}" id="myCasesList"

                                           var="caseDetails">                           

                                   

                                   <a4j:commandLink value="B000002" render="caseDetailsPane">

                                            <f:setPropertyActionListener target="#{myCasesService.selectedCustomerNumber}"

                                                             value="B000002" />

                                  </a4j:commandLink>                           

             

            </rich:list>

             

            Not sure why this works and the other doesn't.

             

            Kevin.