https://www.primefaces.org/showcase/ui/ ... gler.xhtml
Code: Select all
<p:dataTable id="cars" var="car" value="#{dtBasicView.cars}">
<f:facet name="header">
List of Cars
<p:commandButton id="toggler" type="button" value="Columns" style="float:right" icon="ui-icon-calculator" />
<p:columnToggler datasource="cars" trigger="toggler" />
</f:facet>
the only workaround is to use
Code: Select all
style="float:center"
Code: Select all
style="float:right"
Is there a workaround I can apply in the meantime?
Can the toggler be added in the demo app?
============
The entire code:
Code: Select all
<p:dataTable id="cars" var="car" value="#{dtBasicView.cars}">
<f:facet name="header">
List of Cars
<p:commandButton id="toggler" type="button" value="Columns" style="float:right" icon="ui-icon-calculator" />
<p:columnToggler datasource="cars" trigger="toggler" />
</f:facet>
<p:column headerText="Id">
<h:outputText value="#{car.id}" />
</p:column>
<p:column headerText="Year">
<h:outputText value="#{car.year}" />
</p:column>
<p:column headerText="Brand">
<h:outputText value="#{car.brand}" />
</p:column>
<p:column headerText="Color">
<h:outputText value="#{car.color}" />
</p:column>
<p:column headerText="Price">
<h:outputText value="#{car.price}">
<f:convertNumber type="currency" currencySymbol="$" />
</h:outputText>
</p:column>
</p:dataTable>