On 07.10.2005, at 00:35, Robert Van Overmeiren wrote:
With the 'display' taglib, I don't see a way to massage the ResultSet
values, so I had to do some major concatenations in the SQL string to
build the full address, and the link to mapquest.
simply use a Decorator class. That way you keep your Java code outside
the JSP, as suggested (or in your case out of the DB)
...
Now the output table looks like this...
<display:table name="${rs.rows}" cellspacing="0">
<display:column property="name" title="Name" style="width: 35%"
headerClass="dir_hds" />
<display:column property="full_adr" title="Address"
style="width: 30%" headerClass="dir_hds" />
<display:column property="phn" title="Phone" style="width: 15%"
headerClass="dir_hds" />
<display:column property="hours" style="width: 20%"
headerClass="dir_hds" />
</display:table>
Now that does look a lot better, does it not?
I guess one of the neat things about this is you can make columns
sortable (sortable="true") without having the build your own links (and
supporting process) in the column heads. This didn't work though. Maybe
if it was its own webapp outside Magnolia it would. I don't see how a
bean would be able to re-sort without setting a parameter in the 'order
by' clause and re-querying.
True, it does not work for me either, but since Fabrizio who wrote
DISPLAYTAG is also main committer for Magnolia, I am sure we will find
a solution ;-)
Cheers
Boris
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------