Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to increase the width of datatable in PrimeFaces?
    text
    copied!<p>How to increase the width of datatable in PrimeFaces?</p> <p>see below my .xhtml file</p> <pre><code>&lt;h:form&gt; &lt;p:dataTable style="width: 60%" id="dt1" value="#{bean.list}" var="entry" first="0" paginator="true" rows="10" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" rowsPerPageTemplate="5,10,15" scrollable="true" emptyMessage="No cars found with given criteria" &gt; &lt;f:facet name="header"&gt; &lt;h2&gt;Cars View&lt;/h2&gt; &lt;/f:facet&gt; &lt;p:column sortBy="#{entry.carno}" filterBy="#{entry.carno}"&gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="Car Number" /&gt; &lt;/f:facet&gt; &lt;h:outputText value="#{entry.carno}"&gt;&lt;/h:outputText&gt; &lt;/p:column&gt; &lt;p:column sortBy="#{entry.carsettings['car-model']}" filterBy="#{entry.carsettings['car-model']}"&gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="Car Model"/&gt; &lt;/f:facet&gt; &lt;h:outputText value="#{entry.carsettings['car-model']}"&gt;&lt;/h:outputText&gt; &lt;/p:column&gt; &lt;p:column sortBy="#{entry.carsettings.year}" filterBy="#{entry.carsettings.year}"&gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="Car Year"/&gt; &lt;/f:facet&gt; &lt;h:outputText value="#{entry.carsettings.year}"&gt;&lt;/h:outputText&gt; &lt;/p:column&gt; &lt;p:column sortBy="#{entry.carsettings.color}" filterBy="#{entry.carsettings.color}"&gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="Car Color"/&gt; &lt;/f:facet&gt; &lt;h:outputText value="#{entry.carsettings.color}"&gt;&lt;/h:outputText&gt; &lt;/p:column&gt; &lt;/p:dataTable&gt; &lt;/h:form&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload