bugfix - PrimeFaces Datatable with inputText and selectBooleanCheckbox refresh correctly
€8-30 EUR
Closed
Posted over 3 years ago
€8-30 EUR
Paid on delivery
Hi all,
on my frontend I have a p:dataTable with several columns (many of that are outputText, but some are p:inputText and p:selectBooleanCheckbox).
When I filter the list of elements using the header filter of the column to save only few elements to database, the header filters are cleaned. So I solved this problem using filterValue="#{[login to view URL]}" in p:column, but when the p:dataTable is updated the editable components like p:inputText and p:selectBooleanCheckbox are not updated correctly, however if I change the filters the p:dataTable is update and the editable fields shows the correct values, THI HAPPENS ONLY IF I CHANGE THE FILTER VALUES
This is the XHMTL code:
<p:dataTable id="trips-table" widgetVar="trips-table" first="#{[login to view URL]}" rowIndexVar="tripIdx" rowKey="#{[login to view URL]}" var="trip" value="#{[login to view URL]}" filteredValue="#{[login to view URL]}" paginator="true" paginatorPosition="top" rows="15" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {Exporters} {RowsPerPageDropdown}">
<!-- ManyColumns -->
<p:column headerText="#{text['[login to view URL]']}" filterBy="#{[login to view URL]}" filterMatchMode="contains" filterValue="#{[login to view URL]}" sortBy="#{[login to view URL]}">
<p:inputText value="#{[login to view URL]}" title="#{[login to view URL]}" />
</p:column>
</p:dataTable>
filteredTrips in TripList (bean) is defined as List<Map> and tableFilters is defined as Map tableFilters = new HashMap<>();
I ma looking for anyone can help me to fix it.