(as a test i used one inputText, one h:select and 2 p:select)
Code: Select all
<p:dataTable
.
.
<p:rowExpansion>
.
.
<p:panel>
<p:panelGrid>
<p:row>
<p:column><h:outputText value="#{i18n['carrierReasonCode.title']}" style="font-weight: bold" /></p:column>
<p:column><h:outputText value="#{i18n['trafficTypeCode.title']}" style="font-weight: bold" /></p:column>
<p:column><h:outputText value="#{i18n['directionCode.title']}" style="font-weight: bold" /></p:column>
<p:column><h:outputText value="#{i18n['consignmentTypeCode.title']}" style="font-weight: bold" /></p:column>
</p:row>
<p:row>
<p:column>
<p:inputText value="#{potential.carrierReasonCode}" />
</p:column>
<p:column>
<h:selectOneMenu value="#{potential.trafficTypeCode}" style="width:96%">
<f:selectItem itemValue="" itemLabel="#{i18n['select']}" />
<f:selectItems value="#{referenceDataController.temp.entrySet()}" var="entry" itemValue="#{entry.key}" itemLabel="#{entry.value}" />
<f:ajax event="change" listener="#{potentialController.changed()}" />
</h:selectOneMenu>
</p:column>
<p:column>
<p:selectOneMenu value="#{potential.directionCode}" style="width:96%">
<f:selectItem itemValue="" itemLabel="#{i18n['select']}" />
<f:selectItems value="#{referenceDataController.temp.entrySet()}" var="entry" itemValue="#{entry.key}" itemLabel="#{entry.value}" />
<f:ajax event="change" listener="#{potentialController.changed()}" />
</p:selectOneMenu>
</p:column>
<p:column>
<p:selectOneMenu value="#{potential.consignmentTypeCode}" style="width:96%">
<f:selectItem itemValue="" itemLabel="#{i18n['select']}" />
<f:selectItems value="#{referenceDataController.temp.entrySet()}" var="entry" itemValue="#{entry.key}" itemLabel="#{entry.value}" />
<f:ajax event="change" listener="#{potentialController.changed()}" />
</p:selectOneMenu>
</p:column>
</p:row>
</p:panelGrid>
</p:panel>
.
.
FINE: UPDATE curpov01 SET pot_carr_reason_cd = ?, pot_con_type_cd = ?, pot_direction_cd = ?, pot_traff_type_cd = ? WHERE (pot_id = ?)
bind => [22, 3, 2, 1, 1000055827]
But then when i click save again .. even though i have not 'expanded' or changed any value, the 3 selects have lost its value (though the 22 stored in the text box remains):
FINE: UPDATE curpov01 SET pot_con_type_cd = ?, pot_direction_cd = ?, pot_traff_type_cd = ? WHERE (pot_id = ?)
bind => [null, null, null, 1000055827]
Is this valid behavior? Or is there a bug in Primfaces when it comes to <p:selectOneMenu> and <p:rowExpansion>?
Code: Select all
INFO: Initializing Mojarra 2.2.7
INFO: Running on PrimeFaces 5.0
INFO: Running on PrimeFaces Extensions 2.1.0