7 Replies Latest reply on Oct 21, 2015 4:03 AM by vidyasagar penugonda

    RF-4 Passing parameters to Bean when clicking on Context menu.

    vidyasagar penugonda Novice

      Hi, I am passing some values in the Contextmenu when click on Item value in Data table row. Sorry for my poor English.

      Below is my code.

      <rich:contextMenu attached="false" id="contextMenu" showDelay="0">

        <rich:menuItem id="rpt01" label="Show Popup"

             mode="ajax" immediate="true"



             render="popupForm" style="text-align:left">

                  <f:param name="pKey" value="{pKey}" />





      In My DataTable

      <rich:dataTable value="#{backingBean.dataModel}"

             binding="#{backingBean.pDataTable}" style="width:1680px;"

             id="tableData" rows="25" var="dataTableItem"



             noDataLabel="No Records Found"


             <f:facet name="header">



                                         <h:outputText id="pHeader" value="Emp ID"/>



                                         <h:outputText id="nHeader" value="Emp Name"/>





                        <h:panelGroup id="detailsCellGroup"

                                 <h:outputText id="idVal" value="#{dataTableItem.empId}"/>

                                 <h:graphicImage value="/images/arrowRed.gif" id="pic1"

                                      width="5" height="8" />

                                 <rich:componentControl event="click" target="contextMenu" operation="show">

                                      <a4j:param noEscape="true" value="event" />

                                      <f:param name="pKey" value="#{dataTableItem.empId}" /> 





                     <h:outputText id="namVal" value=#{dataTableItem.empName}"/>



      with the above code, when I click on 'Show Popup' context menu Item I am taking the 'pKey' param from request parameters. here I am getting param value as '{pKey}' in the listener method.


      what is the issue here. why I am not getting 'pKey' parameter value in my bean. This works fine in RF-3.3.3 and the same syntax not working in the RF-4.5.6. Is there any change in passing parameters to the context menu? Any help is greatly appreciated.