Proper way to add Datatable Toggler

Post Reply
Posts: 13
Joined: 24 Mar 2015, 22:13

04 Sep 2018, 17:19

in sample.xhtml of paradise I add a toggler:

Code: Select all

<p:dataTable id="cars" var="car" value="#{}" reflow="false" selectionMode="single" selection="#{dtSelectionView.selectedCar}" rowKey="#{}">
                                <f:facet name="header">
                                    <p:commandButton id="toggler" type="button" value="Columns" style="float:right" icon="ui-icon-calculator" />
                                    <p:columnToggler datasource="cars" trigger="toggler" />
                                <p:column headerText="Id" sortBy="#{}">
                                    <h:outputText value="#{}" />
And this is the result:

What is the proper way to add the column toggler ?

Posts: 123
Joined: 27 Mar 2016, 13:05

05 Sep 2018, 07:38

You could remove style="float=right" and it will fix.

You could give style p:commandButton according to your needs.

Post Reply

Return to “Paradise - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest