I'm trying to create simple table with header align to left OR right
In case of numeric the header should align to right otherwise to left.
This is my code:
<tr:treeTable width="700px" var="file" value="#{bean.files}">
<tr:column>
<f:facet name="header" >
<tr:outputText value="File Name"/>
</f:facet>
<tr:outputText value="#{file.fileName}"/>
</tr:column>
<tr:column inlineStyle="text-align:right">
<f:facet name="header" >
<tr:outputText value="File Size"/>
</f:facet>
<tr:outputText value="#{file.size}"/>
<tr:convertNumber type="number"/>
</tr:column>
The output from my code is that the column rows are align correctly right or left as I wanted BUT the column headers are not being align to right, just to left.
My question is how can I make the column header to be align to right as well.
In the example above I need that the header File Size will be align to rigth
Thanks,
John.
You can use align
attribute of tr:column
.
Example :
<tr:column align="right" headerText="File Name">
<tr:outputText value="#{file.fileName}"/>
</tr:column>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.