Hello,
Does anybody know how can I access Maps in the property tag of a DisplayTag?
For example, suppose I have this class:
class A {
Map<String, String> getAttributes() {
// implementação
}
}
The data to be displayed are stored in session-scoped variable called
"results". The data are in a List<A>. I have a second list (of String values)
that contains the keys to the Map returned by the method getAttributes() of
class A (this second list is stored in a session-scoped variable called
"headers").
In addition, my table will contain a dynamic number of columns, whose size is
equal to the size of the headers list.
I´ve already managed to display the table with the correct columns, but it
shows empty cells. I didn´t succeed in displaying each map value in its
respective column. The code I´m using is the following:
<display:table name="results">
<c:forEach var="header" items="${headers}">
<display:column property="attributes[${header}]"
title="${header}"/>
</c:forEach>
</display:table>
In this code, I´m accessing the property "attributes" (since there is a method
called getAttributes in each item A of the results List), but this syntax
("attributes[${header}]") to get the value from the header key is not working.
Does anybody know how I can accomplish this task?
Thanks,
Alexandre
Abra sua conta no Yahoo! Mail, o único sem limite de espaço para
armazenamento!
http://br.mail.yahoo.com/
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user