Hi
I am using California theme and wanted to add command buttons to datatable pagination row without distracting page numbers alignment and changing width of the datable.
please let me know. thanks in advance.
How to add command buttons in datatable pagination row
Forum rules
Please note that response time for technical support is within 3-5 business days.
Please note that response time for technical support is within 3-5 business days.
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Example is here; https://www.primefaces.org/custom-content-in-paginator/
Github Profile: https://github.com/mertsincan
I am able to add content to pagination row,
1. but button and menu become not clickable, as menuItem requires form tag but datable not supporting form tag. Here is my code and added screen shot in google drive.
2. when I align using <div align="right"> row height get increasing, page numbers and exporter content are not aligned.
please let me know.
https://drive.google.com/drive/folders/ ... 1M3HO-BPTk
1. but button and menu become not clickable, as menuItem requires form tag but datable not supporting form tag. Here is my code and added screen shot in google drive.
2. when I align using <div align="right"> row height get increasing, page numbers and exporter content are not aligned.
please let me know.
https://drive.google.com/drive/folders/ ... 1M3HO-BPTk
Code: Select all
<div class="ui-g-12 ui-md-12 ui-lg-12">
<p:dataTable id="deptData" var="dept" value="#{deptView.deptList}" selectionMode="single" reflow="true"
rowKey="#{dept.id}" paginator="true" rows="15" paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {Exporters}" style="margin-bottom:20px">
<f:facet name="{Exporters}">
<p:commandButton type="button" icon="fa fa-plus" value="Add" />
<p:menuButton value="Options">
<p:menuitem value="Exporte Excel" ajax="false" immediate="true" icon="fa fa-file-excel-o">
<p:dataExporter type="xls" target="deptData" fileName="Department"/>
</p:menuitem>
<p:menuitem value="Exporte PDF" ajax="false" immediate="true" icon="fa fa-file-pdf-o">
<p:dataExporter type="pdf" target="deptData" fileName="Department"/>
</p:menuitem>
</p:menuButton>
</f:facet>
<p:column headerText="Department Id" sortBy="#{dept.id}" style="text-align: center;">
<h:outputText value="#{dept.id}" />
</p:column>
<p:column headerText="Name" sortBy="#{dept.name}">
<h:outputText value="#{dept.name}" />
</p:column>
<p:column headerText="Edit" exportable="false" style="text-align: center;">
<p:commandButton type="button" icon="fa fa-fw fa-edit" style="font-size: 12px;" update="edit" oncomplete="PF('edit').show();"/>
</p:column>
<p:column headerText="Attributes" exportable="false" style="text-align: center;">
<p:commandButton type="button" icon="fa fa-plus-circle" style="font-size: 12px;" />
</p:column>
</p:dataTable>
</div>
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Hi @techgeek,
This is a PrimeFaces core issue. Please try it without California Theme or Layout. Could you please create a ticket on PrimeFaces Github for it?
Best Regards,
This is a PrimeFaces core issue. Please try it without California Theme or Layout. Could you please create a ticket on PrimeFaces Github for it?
Best Regards,
Github Profile: https://github.com/mertsincan
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
This is not a Layout or Theme issue. Please create an issue on https://github.com/primefaces/primefaces
Best Regards,
Best Regards,
Github Profile: https://github.com/mertsincan
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Thanks a lot!
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 6 guests