In your column (or columns) tag simply specify a style to align the text
contained in that column.  We use something like this in our <t:columns>
tag:

style="text-align:#{dataTableBean.alignment};"

Where getAlignment() in the backing bean returns "left", "right" or
"center" depending on the current column.

If you are using a <t:column> tag then you can explicity set the style
like this:

style="text-align:RIGHT;"


>
> I have 1 row of 10 fields, with respective column headers, which I need to
> display in a two-row table.  Some fields are strings and some are numbers
> and dates.  Applying typical justification rules, I need to right justify
> dates and numbers and left justify the Strings.  I have come to the
> conclusion that I can't use <h:dataTable>.  The question is, how do I get
> the ability to specify justification without the use of <h:dataTable>?
>
> It may be my ignorance but I'm finding JSF view rendering unecessarily
> restrictive, when something like this should be allowed (or at least
> configurable).  HTML nested in <f:verbatim> doesn't seem to render
> properly
> when there are JSF tags (<h:outputText/>) nested within.
> --
> View this message in context:
> http://www.nabble.com/text-align%3A-center---without-%3Ch%3AdataTable%3E-tf2631645.html#a7344409
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>


Reply via email to