>
> However, it might still be useful to provide another tag that can do
> simple formatting of strings/numbers/etc if a good one doesn't already
> exist. I've got a couple simple ones I've written for formatting numbers
> with commas and dollar signs and stuff. I agree with Benjamin that this
> should not be the focus of our development.
>
I think it was suggested to use tags inside the column tag body for
"decorating". To support this the new design should make the current row
available as a scripting variable and/or a scoped variable. Then you could
decorate using JSP. For example, say you want to format a column as a
currency. Assuming the scoped variable for the current iteration is set by
the var attribute (following JSTL convention), then we could do something
like this.
<display:table var="row" ...>
<display:column property="salary">
<fmt:formatNumber type="currency" value="${row.salary}"/>
</display:column>
<display:column property="hireDate">
<fmt:formatDate value="${row.hireDate}"/>
</display:column>
...
</display:table>
Perhaps it would be good to also define a scoped variable for the current
field. This would require collaboration between the table and column tags.
But the benefit would be not having to indicate the actual property name of
the current row. This example assumes the colVar attribute of table defines
the name of the scoped variable for the current field.
<display:table var="row" colVar="field" ...>
<display:column property="salary">
<fmt:formatNumber type="currency" value="${field}"/>
</display:column>
<display:column property="hireDate">
<fmt:formatDate value="${field}"/>
</display:column>
...
</display:table>
We should also get rid of the display.properties file and instead do these
type of settings the JSP way too.
-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
displaytag-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel