RF-4 Passing parameters to Bean when clicking on Context menu.
vpenugo Oct 8, 2015 10:45 AMHi, 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"
oncomplete="#{rich:component('PopupPanel')}.show();"
actionListener="#{backingBean.mapPopupValues}"
render="popupForm" style="text-align:left">
<f:param name="pKey" value="{pKey}" />
</rich:menuItem>
</rich:contextMenu>
In My DataTable
<rich:dataTable value="#{backingBean.dataModel}"
binding="#{backingBean.pDataTable}" style="width:1680px;"
id="tableData" rows="25" var="dataTableItem"
onrowmouseover="this.style.backgroundColor='#ECE5B6'"
onrowmouseout="this.style.backgroundColor='#FFFFFF'"
noDataLabel="No Records Found"
footerClass="tableFooterScrollHolder">
<f:facet name="header">
<rich:columnGroup>
<rich:column>
<h:outputText id="pHeader" value="Emp ID"/>
</rich:column>
<rich:column>
<h:outputText id="nHeader" value="Emp Name"/>
</rich:column>
</rich:columnGroup>
</f:facet>
<rich:column>
<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}" />
</rich:componentControl>
</h:panelGroup>
</rich:column>
<rich:column>
<h:outputText id="namVal" value=#{dataTableItem.empName}"/>
</rich:column>
</rich:dataTable>
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.