<p:dataTable id="users" editMode="row" editable="true" var="user" value="#{userBean.uservos}" sortOrder="descending" widgetVar="userTable" filteredValue="#{userBean.filteredUsers}">
<p:ajax event="rowEdit" listener="#{userBean.onRowEdit}" update="users" />
<p:columns value="#{userBean.columns}" var="column" columnIndexVar="colIndex" sortBy="#{user[column.property]}" filterBy="#{user[column.property]}">
<f:facet name="header">
<h:outputText value="#{column.header}" />
</f:facet>
<p:column>
<p:cellEditor>
<f:facet name="output"><h:outputText value="#{user[column.property]}"></h:outputText></f:facet>
<f:facet name="input"><h:inputText value="#{user[column.property]}" styleClass="input ilarge" /></f:facet>
</p:cellEditor>
</p:column>
</p:columns>
<p:column headerText="Edit">
<p:rowEditor id="edit"/>
</p:column>
</p:dataTable>
how Sort date in dynamic columns
Hello, simply make sure the column object you have is the type "Date" and not string, otherwise the sorter will not work correctly... by column object I mean the value you return from the call
must be type date.
Code: Select all
<h:outputText value="#{user[column.property]}"
That is your job to post a fully working example that is as minimalistic as possiblemor wrote:Hello, simply make sure the column object you have is the type "Date" and not string, otherwise the sorter will not work correctly... by column object I mean the value you return from the callmust be type date.Code: Select all
<h:outputText value="#{user[column.property]}"
And am I wrong in the assumption you do not need any help? There are othe things mentioned in the forun postingrules...
-
- Information
-
Who is online
Users browsing this forum: No registered users and 26 guests