You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Gaet <ga...@free.fr> on 2005/03/01 12:32:00 UTC

Format a property in a

Hello,

I would like to format a property of a <collectionItem> tag by calling a
java method
I have tried the following code :

<layout:collection name="myVector" id="myRow" align="left">
    <layout:collectionItem title="libelle.workDuration" sortable="true"
style="text-align: right;"
width="50"><%Util.formatWorkDuration(myRow.getWorkDuration());%></layout:col
lectionItem>
</layout:collection>


where "myRow.getWorkDuration()" returns a number of hours worked like "1600"
and "Util.formatWorkDuration(myRow.getWorkDuration())" format "1600" to "10
months and 2 days"

Obviously this doesn't work as "myRow" is not found by the java compiler..

How can I do this?

Thanks!


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org