2013/7/1 Miguel Figueiredo <[email protected]>:
> Hi,
Hi
> I need to add a column override that contains an enum, but I am having
> trouble localizing it.
>
> For example:
>
> <t:grid source="datasource" row="rowElement">
> <p:columnCell>
> ${rowElement.column}
> </p:columnCell>
> </t:grid>
>
> My rowElement.column corresponds to an enum like:
>
> enum Column {
> A, B
> }
Just create a getter in your page/component
public String getColumnLabel()
{
return messages.get(rowElement.getColumn().name() + "-label");
}
with the corresponding labels in your properties:
A-label=Alabel
B-label=The "B"
then you can use that in your template:
<t:grid source="datasource" row="rowElement">
<p:columnCell>
${columnLabel}
</p:columnCell>
</t:grid>
> Best regards,
> Miguel
Cheers,
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]