p:commandButton
have no method to call in actionListener
. I have just used it for hiding dialog editSensorDialog
But its calling the method addDeviceMappings
in p:selectOneMenu
's valueChangeListener
.
any thing wrong in my code, why p:commandButton
calling unnecessary?
Complete code of above issue :
<p:dialog id="editSensorDialog" style="width: 360px;" width="360" height="400"
modal="true" widgetVar="editSensorDialog" resizable="false" >
<p:dataTable id="editSensorList" value="#{sensorController.sensorsMappingList}"
var="item" rowIndexVar="rowIndex">
<p:column headerText="#{bundle['label.Sensor']}" id="editdeviceName">
<h:outputText rendered="false" value="#{item.value}"/>
<p:selectOneMenu valueChangeListener="#{sensorController.addDeviceMappings}">
<p:ajax update="@this"/>
<f:selectItems value="#{item.value}" var="sensor" itemLabel="#{sensor}"
itemValue="#{item.name}+#{sensor}"/>
</p:selectOneMenu>
</p:column>
<f:facet name="footer">
<p:commandButton value="#{bundle['label.Submit']}"
onsuccess="editSensorDialog.hide()"/>
</f:facet>
</p:dataTable>