Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4790590
By: chikkubhai
Interestingly my question was already posted sometime in 2006, and is attached
below. And even now, I have the same problem that the Strings in the array are
not displayed, rather its .toString() equivalents are displayed() and all I
see is garbage instead of strings. Any suggestions to this newbie please :
Hi
I am trying to display a 2D String array using the display tag. Here is how
I am trying to use it.
String[][] data = String[5][5];
for (int i=0; i<5; i++) {
for (int j=0; j<5; j++) {
data[i][j] = "element " + i + " " + j;
}
}
request.setAttribute("data", data);
<display:table name="data"/>
I was expecting to see a 5 by 5 table with the cells populated with the text
in the 2D array. But instead I see a table with 5 rows and each row contains
the toString() representation of a String[].
What is the right way of doing this. Please help.
Hemant
______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=249318
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user