
primefaces - issue #8199
Datatable values are not passing to Backing bean after applying filter
I have a xhtml page where I am using the "filterBy" funtion of primefaces in Datatable. The list displaying values for my front end gets updated if i don't use filtering and not if I use filtering.
The code for my datatable is: <p:panel headerClass="fHeader" style="width:98%;" header="#{label.locationListHeader}" styleClass="mySubPanelStyle" id="locationTable"> <c:forEach var="policyNokey" items="${locationHandler.policyNoKeyList}" varStatus="rowCounter">
<p:panel header="Policy Number : #{locationHandler.certPolicyMap[policyNokey].partialPolicy.policyNumber}">
<div><p:dataTable var="certInfo" rowIndexVar="rowIndex" widgetVar="dataTableWidgetVar"
paginatorAlwaysVisible="false" style="width:100%"
value="#{locationHandler.masterLocationList[policyNokey]}"
rows="#{label.locationList_defaultNumberOfRows}"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="#{label.locationList_numberOfRows}"
paginator="true">
<p:column style="text-align:left;white-space:normal;vertical-align:top;width:5%;">
<f:facet name="header">
<h:outputText value="#{label.selectLocation}" />
</f:facet>
<h:selectBooleanCheckbox id="locationSelection" disabled="#{certInfo.selectableLocation}"
value="#{certInfo.selectedLocation}" class="locSelection" >
<f:ajax execute="@this"
listener="#{locationHandler.selectAllSOIs}"
render="InsurenceList InsurenceListNEW" />
<f:attribute name="modifiedLoc" value="#{certInfo}" />
</h:selectBooleanCheckbox>
<h:graphicImage url="/images/icons/red-slash.gif" class="overrideIcon"
rendered="#{certInfo.location.overridelocationDetails.overrideInd and certInfo.location.overridelocationDetails.locationInd eq 'Y'}">
<p:ajax event="click" update="ovrdLocInfo"
oncomplete="overLocDlg.show();"
listener="#{locationHandler.setSelectedOverLocInfo}" />
<f:param name="rowValue" value="#{policyNokey}+#{rowIndex}" />
</h:graphicImage>
<h:graphicImage url="/images/icons/green.gif" class="overrideIcon"
rendered="#{certInfo.location.overridelocationDetails.overrideInd and certInfo.location.overridelocationDetails.locationInd eq 'N'}">
<p:ajax event="click" update="ovrdLocInfo"
oncomplete="overLocDlg.show();"
listener="#{locationHandler.setSelectedOverLocInfo}" />
<f:param name="rowValue" value="#{policyNokey}+#{rowIndex}" />
</h:graphicImage>
</p:column>
<p:column style="text-align:left;white-space:normal;vertical-align:top;width:11%;"
sortBy="#{certInfo.coverage.coverageCd}#{certInfo.location.overridelocationDetails.coverageNewValue}"
filterBy="#{certInfo.coverage.coverageCd}#{certInfo.location.overridelocationDetails.coverageNewValue}" filterStyle="width:35px" >
<f:facet name="header">
<h:outputText value="#{label.coverage}" />
</f:facet>
<h:outputText value="#{certInfo.coverage.coverageCd}" rendered="#{!certInfo.location.overridelocationDetails.coverageChangeInd}"/>
<h:outputText value="#{certInfo.location.overridelocationDetails.coverageNewValue}" rendered="#{certInfo.location.overridelocationDetails.coverageChangeInd}" style="font-weight:bold;"/>
</p:column>
<p:column style="text-align:left;white-space:normal;vertical-align:top;width:10%;"
sortBy="#{certInfo.location.locationNumberInt}"
filterBy="#{certInfo.location.locationNumber}#{certInfo.location.overridelocationDetails.locNbrNewValue}" filterStyle="width:35px">
<f:facet name="header">
<h:outputText value="#{label.locationPremises}" />
</f:facet>
<h:outputText value="#{certInfo.location.locationNumber}" rendered="#{!certInfo.location.overridelocationDetails.locNbrChangeInd}"/>
<h:outputText value="#{certInfo.location.overridelocationDetails.locNbrNewValue}" rendered="#{certInfo.location.overridelocationDetails.locNbrChangeInd}" style="font-weight:bold;"/>
</p:column>
<p:column style="text-align:left;white-space:normal;vertical-align:top;width:10%;"
sortBy="#{certInfo.location.com_csc_BldgNumInt}"
filterBy="#{certInfo.location.com_csc_BldgNum}#{certInfo.location.overridelocationDetails.bldNbrNewValue}" filterStyle="width:35px">
<f:facet name="header">
<h:outputText value="#{label.building1}" />
</f:facet>
<h:outputText value="#{certInfo.location.com_csc_BldgNum}" rendered="#{!certInfo.location.overridelocationDetails.bldNbrChangeInd and !certInfo.location.overridelocationDetails.inqAddLocInd}"/>
<h:outputText value="#{certInfo.location.overridelocationDetails.bldNbrNewValue}" rendered="#{certInfo.location.overridelocationDetails.bldNbrChangeInd or certInfo.location.overridelocationDetails.inqAddLocInd}" style="font-weight:bold;"/>
</p:column>
<p:column style="text-align:left;white-space:normal;vertical-align:top;width:40%;"
sortBy="#{certInfo.location.address.addrOnScreen}#{certInfo.location.overridelocationDetails.desPremisesNewValue}"
filterBy="#{certInfo.location.address.addrOnScreen}#{certInfo.location.overridelocationDetails.desPremisesNewValue}" filterStyle="width:350px" filterMatchMode="contains">
<f:facet name="header">
<h:outputText value="#{label.address}" />
</f:facet>
<h:outputText value="#{certInfo.location.address.addrOnScreen}" rendered="#{!certInfo.location.overridelocationDetails.desPremisesChangeInd}"/>
<h:outputText value="#{certInfo.location.overridelocationDetails.desPremisesNewValue}" rendered="#{certInfo.location.overridelocationDetails.desPremisesChangeInd}" style="font-weight:bold;"/>
</p:column>
<p:column style="text-align:left;white-space:normal;vertical-align:top;width:19%;">
<f:facet name="header">
<h:outputText value="#{label.soi}" />
</f:facet>
<h:selectManyCheckbox styleClass="ui-reissue-policy-list-table" id="InsurenceList"
value="#{certInfo.selectedSOIList}" layout="pageDirection" rendered="#{!certInfo.location.overridelocationDetails.selectedSubInsChangeInd}"
>
<p:ajax event="click" listener="#{locationHandler.setDummy}" update="locationTable" >
<f:param name="Dummy" value="Test"/>
</p:ajax>
<f:selectItems value="#{certInfo.subjectofInsurenceList}"/>
</h:selectManyCheckbox>
<h:selectManyCheckbox id="InsurenceListNEW" styleClass="ui-reissue-policy-list-table"
value="#{certInfo.location.overridelocationDetails.selectedSub}" layout="pageDirection" rendered="#{certInfo.location.overridelocationDetails.selectedSubInsChangeInd}" style="font-weight:bold;">
<p:ajax event="click" listener="#{policyHandler.setSelectedCoverageCodes1}" process="@this" update="locationTable"/>
<f:selectItems value="#{certInfo.location.overridelocationDetails.subInsNewValue}" />
</h:selectManyCheckbox>
</p:column>
<p:column style="text-align:left;white-space:normal;vertical-align:top;width:5%;">
<f:facet name="header">
<h:outputText value="#{label.location_Action}" />
</f:facet>
<p:commandLink value="#{label.changeLink}" action="changeLocation">
<f:setPropertyActionListener value="#{certInfo}" target="#{locationHandler.locationDetails}" />
<f:attribute name="change" value="#{certInfo}" />
</p:commandLink>
</p:column>
</p:dataTable></div>
</p:panel>
</c:forEach>
</p:panel>
<br />
<div style="position:relative;bottom:0px;"><p:commandButton id="addLocation" value="#{label.addLocation}"
action="addLocation" /></div>
<br />
</p:panel>
<div align="center" style="position:relative;bottom:0px;"><p:commandButton
rendered="#{locationHandler.locationActionCd eq 'add'}"
id="continue" value="#{label.continue}" action="continue" />
<p:spacer width="10" height="5" />
<p:commandButton rendered="#{locationHandler.locationActionCd eq 'add'}"
value="#{label.close}" onclick="manageCertClose.show();" ajax="true"/>
<p:spacer
width="10" height="5" /> <p:commandButton
rendered="#{locationHandler.locationActionCd eq 'add'}"
value="#{label.discard}"
onclick="discardCert.show();" /> <p:commandButton
value="Accept"
rendered="#{locationHandler.locationActionCd eq 'edit'}"
action="accept" update="locationTable"/><p:spacer width="10" height="5" /> <p:commandButton
id="cancel" value="#{label.cancel}" action="cancel" styleClass="lastComp"/></div>
<p:spacer width="1" height="5" />
!!! PLEASE USE GITHUB ISSUE TRACKER !!!
Status: Review
Labels:
Priority-Medium
Type-NewFeature
TargetVersion-FUTURE