myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lindholm, Greg" <>
Subject RE: tag to truncate outputText?
Date Thu, 13 Apr 2006 13:25:31 GMT

-----Original Message-----
From: Michael Heinen [] 

> The converter was created only once in the datatable and before the
> datatable has been processed.

This sounds correct.

> That means there is only one converter for all cells.

If you have your converter tag inside a column then you get
one converter for each column. (Not sure what happens if your
dataTable is nested inside a column of another dataTable.)

> So I have to move the creation of the ValueBinding from the
> TruncateConverterTag into the getAsString() method of the
> TruncateConverter because I have column specific truncationAt
> attributes.
> There is of course an overhead because the ValueBinding has to be
> resolved for every cell and not only once per column.

I guess you could save the tag's attibute string in the 
converter and do the value binding everytime getAsString()
is called. Give it a try. It sounds slow but computers are fast
and dynamic stuff is always more expensive.
(Maybe create a new DynamicTruncateConverter  :)

View raw message