I have a commandButton that execute an overlayPanel into a dataGrid, but I increment rows dynamically; that is the problem because I want than each commandButton execute an unique overlayPanel.
I have using the rowIndexVar param (of the dataGrid) to change the name of the commandButton and the value of 'for' into the overlayPanel, but is impossible, this value (rowIndexVar) return null or '0'.
Somebody knows how I set a dynamic ID to my commandButton???
THX!
Code: Select all
<p:dataGrid value="#{empresasBean.listActividades}" var="item" columns="1" id="dataGridCNAE" rowIndexVar="rowIndex" >
<p:commandButton id="btn_#{rowIndex}" value="VALOR #{rowIndex}" >
<f:attribute name="selectedCNAE" value="0#{rowIndex}" />
</p:commandButton>
<p:overlayPanel dynamic="true" for="btn_#{rowIndex}" hideEffect="fade"
widgetVar="SANTI_lista" styleClass="comboOveAd" appendToBody="false"
my="left top" at="left bottom" style="width:300px">
<h:form>
....
....