Datatable with input loses values on sort and paging

UI Components for JSF
Post Reply
jonathan.morgan
Posts: 11
Joined: 22 Mar 2010, 16:44

19 May 2010, 09:03

Hi there,

I have a data table with inputtext tags inside it but I notice the test is cleared during sort and going to the next page. Is this a known issue? Is there a fix for this. It looks as if it is not submitting the data before the sort etc

My Table looks like this.

Code: Select all

<p:dataTable id="positions"
dynamic="true"
selectionMode="multiple" value="#{positionBackingBean.positions}"
selection="#{positionBackingBean.selectedRow}" var="position"
paginator="true" rows="50"
paginatorTemplate="{FirstPageLink}{PreviousPageLink}{NextPageLink}{LastPageLink} "
scrollable="true" height="500" width="1000">
<p:column resizable="true" sortable="true"
sortBy="#{position.issuer.gridId}" parser="string">
<f:facet name="header">
<h:outputText value="Grid id" />
</f:facet>
<h:outputText value="#{position.issuer.gridId}" />

</p:column>
<p:column resizable="true" sortable="true"
sortBy="#{position.issuer.issuerName}" parser="string">
<f:facet name="header">
<h:outputText value="Issuer Name" />
</f:facet>
<h:outputText value="#{position.issuer.issuerName}" />

</p:column>
<p:column resizable="true" sortable="true"
sortBy="#{position.book.bookCode}" parser="string">
<f:facet name="header">
<h:outputText value="Book" />
</f:facet>
<div><h:selectOneMenu value="#{position.book}"
converter="#{bookConverter}"
disabled="#{!inputBackingBean.editable}">
<t:selectItems value="#{inputBackingBean.bookList}" var="Book"
itemLabel="#{Book.bookCode}" itemValue="#{Book}" />
</h:selectOneMenu></div>
</p:column>
<p:column resizable="true" sortable="true"
sortBy="#{position.currencyCode}" parser="string">
<f:facet name="header">
<h:outputText value="Currency" />
</f:facet>

<h:inputText value="#{position.currencyCode}"
disabled="#{!inputBackingBean.editable}" size="4" />


</p:column>
</p:datatable>
I'm using primefaces 1.0.0 and myfaces 1.2.8.

Cheers,

Jonathan

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

19 May 2010, 10:41

Hi Jonathan,

Does non dynamic datatable do this as well?

jonathan.morgan
Posts: 11
Joined: 22 Mar 2010, 16:44

08 Jun 2010, 13:41

Yes it does

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

09 Jun 2010, 11:41

Ok, please create an issue ticket so we can have a look in detail.

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

09 Jun 2010, 12:13

Yes, that is right. Datatable is not processed with sort / paging. The current row selection gets lost after sort / paging as well!

Jonathan, can you create an issue so that we can vote for this?
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

jonathan.morgan
Posts: 11
Joined: 22 Mar 2010, 16:44

24 Jun 2010, 13:26

Sorry haven't had time to create an issue yet

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

25 Jun 2010, 19:04

This will be fixed in 2.1.1(aka DataTable release) (August).

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 17 guests