0

I am using column level filters and pagination(inbuilt) in my data table. I wanted to use columntoggler behaviour also. But when use columntoggler specific code inside datatable its not working. If I remove scrollable="true" column toggler will work, but pagination and filter will not work.
I have followed this post

Below is my code. Any inputs on this.

<p:dataTable id="orderslist" var="order"
 value="#{orderdetails.orderDetailsList}" scrollable="true" 
 styleClass="ui-dynamic-height" sortMode="multiple" emptyMessage=""
 resizableColumns="true" frozenColumns="1"
 widgetVar="orderstatustable"  paginator="true"
 rows="15" paginatorPosition="top"
 paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
 rowsPerPageTemplate="15,20,25">
 <f:facet name="header">
    <p:commandButton id="toggler" type="button" value="Columns" style="float:right" icon="ui-icon-calculator" />
    <p:columnToggler datasource="orderslist" trigger="toggler">
    <p:ajax event="toggle" listener="#{orderdetails.onToggle}" />
     </p:columnToggler>
 </f:facet>
Kukeltje
  • 12,223
  • 4
  • 24
  • 47
  • What PF version? Tried the latest? – Kukeltje Jul 29 '15 at 06:38
  • I am using the Primefaces-5.0 – Sudhakar K Jul 29 '15 at 08:47
  • There were two questions… ;-) – Kukeltje Jul 29 '15 at 09:45
  • sorry not tried the latest. – Sudhakar K Jul 29 '15 at 12:11
  • Are you going to try the latest? ;-) Would be good... just to see if things are solved in the mean time – Kukeltje Jul 29 '15 at 12:41
  • Changing primefaces version would take lot of time as need to go for approval. searching for solution within the same version – Sudhakar K Jul 29 '15 at 13:18
  • TRY, not take into production. (and e.g. check the release notes of newer versions). And if it works there, you can check the code differences and e.g. try to make a patch, so you have a fix in the current release. The code behind the DataTable is complex, in such a way that 99.9% of the SO users would not be able to try to create a fix or want to create a fix in their free time. The chance that someone created a fix and can (is allowed) to share it, is not very high). Sorry... – Kukeltje Jul 29 '15 at 14:56
  • In my case resolved with this soluction: http://stackoverflow.com/a/30080223/3017464 – carlosyague Oct 21 '16 at 09:15

0 Answers0