I have a problem sorting on a datatable column, when the content of the column is a h:commandLink.
h:commandLink:
As opposed to using h:outputText:
What can I do to fix this?
Using 1.0.0.RC.
Datatable sort problem
Hi!!
I'm havng the same problem!
I tried with p:commandLink too, but when I put dynamic="true" in my dataTable it stops work at all....
I'm using a loadbuncle to internationalize my app, so var cpg is the same of campaign.....
I tried to put sortBy="#{campaign.campaign}" and sortBy="#{cpg.campaign}"
I took out the h:commandLink of the column and worked just fine.....
Could u help me, please?
TKS!
I'm havng the same problem!
I tried with p:commandLink too, but when I put dynamic="true" in my dataTable it stops work at all....
Code: Select all
<h:form id="campaignTable">
<p:dataTable rows="5" value="#{campaignBean.campaigns}" paginator="true" var="campaign" selection="#{campaignBean.selectedIds}" widgetVar="campaign" emptyMessage="Nao ha registros"
scrollable="true" width="100%" height="250px"
paginatorTemplate="{FirstPageLink}{PreviousPageLink}{PageLinks}{NextPageLink}{LastPageLink}"
rowsPerPageTemplate="50,100,200">
<p:column>
<f:facet name="header">
<h:outputText value="#{cpg.sinc}" />
</f:facet>
<h:graphicImage value="/bidmanagement/images/apply.gif"
rendered="#{campaign.tries == -1}" />
<h:graphicImage value="/bidmanagement/images/sync.gif"
rendered="#{campaign.tries == 0}" />
<h:graphicImage value="/bidmanagement/images/alert1.gif"
rendered="#{campaign.tries == 1}" />
<h:graphicImage value="/bidmanagement/images/alert2.gif"
rendered="#{campaign.tries == 2}" />
<h:graphicImage value="/bidmanagement/images/alert3.gif"
rendered="#{campaign.tries == 3}" />
</p:column>
<p:column sortBy="#{campaign.campaign}">
<f:facet name="header">
<h:outputText value="#{cpg.campaign}" />
</f:facet>
<h:commandLink rel="loading" id="commandCampaign"
action="#{campaignBean.listAdGroups}" value="#{campaign.name}">
<f:param name="campaignID" value="#{campaign.id}" />
</h:commandLink>
</p:column>
I tried to put sortBy="#{campaign.campaign}" and sortBy="#{cpg.campaign}"
I took out the h:commandLink of the column and worked just fine.....
Could u help me, please?
TKS!
Inah from Brazil
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Which sorting method do you guys use? client or ajax? dynamic="true|false" attribute controls that behavior. If it is client sorting, can you try with ajax sorting to see how it works?
I'm using client side sorting. Will see if I can find the time to try Ajax sorting.
There's also a (probably) related problem. You can't use parser="number" when
the column content is h:commandLink, to avoid this problem:
If you use parser="number", the column becomes empty, i.e. no values displayed at all.
There's also a (probably) related problem. You can't use parser="number" when
the column content is h:commandLink, to avoid this problem:
If you use parser="number", the column becomes empty, i.e. no values displayed at all.
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Issue created: http://code.google.com/p/primefaces/iss ... ail?id=357
-
- Information
-
Who is online
Users browsing this forum: No registered users and 30 guests