add a facet to table
<af:table>Table has another property:
<f:facet name="contextMenu">
<af:popup id="cmpop" contentDelivery="lazyUncached">
<af:menu id="cmm1" text="My Context Menu">
<af:commandMenuItem text="Do something"
id="cmi1"
actionListener="#{backingBeanScope.myBean.myActionListener}"/>
</af:menu>
</af:popup>
</f:facet>
</af:table>
contextMenuSelect="true" so this ensures the right click on a row will make the row selected and context menu shows up.
Note:
- add <af:showPopupBehavior triggerType="contextMenu" popupId="cmpop"/> if you like for table columns for context menu display
- add partial triggers so UI refreshes after context menu execution.
No comments:
Post a Comment