Can someone show me how to fix the width of a column in a datatable with JSF?
My code currently reads:
<h:column>
<f:facet name="header">
<h:outputText value="Data Field 1" />
</f:facet>
<h:commandLink id="dataLink" action="#{pc_SearchResultsFragment.setField1}">
<h:outputText value="#{(qi.data1 != null) ? '' : qi.data1}"/>
</h:commandLink>
</h:column>
Thanks!
Well usually you use h:column in a dataTable context.
What you could do is set the width in CSS. If you have the code:
<h:dataTable value="#{action.items}" var="name"
styleClass="tableClass" columnClasses="first,second">
And in the CSS file you do:
.first {
width: 250px;
}
That is assuming you have 2 columns.
Check the dataTable properties here, also you can find there all kind of CSS related properties.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With