You do not need a rowSelectionListener. Just use a oncontextmenu on the row which is generated by ice:panelGroup
when used along with the attributes contextValue
and menuPopup
. The contextValue
can be used to uniquely identify a row.
<ice:column>
<f:facet name="header">
<h:outputText value="Col header" />
</f:facet>
<ice:panelGroup contextValue="#{myVar.rowId}" menuPopup="menupopupId">
<ice:outputText value="#{myVar.property}" />
</ice:panelGroup>
</ice:column>
....
<ui:include src="menuPop.xhtml"/>
menuPop.xhtml
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ice="http://www.icesoft.com/icefaces/component"
xmlns:ui="http://java.sun.com/jsf/facelets">
<ice:panelGroup styleClass="icePnlMenuPopupGrp">
<ice:menuPopup id="menupopupId">
<ice:menuItem id="myItem" value="My Item"
actionListener="#{controller.doAction}">
</ice:menuItem>
.....
</ice:menuPopup>
</ice:panelGroup>
</ui:composition>