Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=5074849 By: battytatty
An example for a one-dimensional array is posted at: http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=64&t=0023 51 Here is the code reproduced here: ============================================== <body> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%> <%@ taglib uri="http://displaytag.sf.net" prefix="display"%> <%@ page import="java.util.*"%> <% String[]strings={"alpha" ,"bravo","charlie","delta","echo"}; request.setAttribute("STRINGS", strings); %> <display:table name="STRINGS" pagesize="1"> </display:table> </body> </html> ============================================== Similarly then an example of displaytag use with a two-dimensional array would be: ============================================== <html> <body> <%@ taglib uri="http://displaytag.sf.net" prefix="display"%> <% String[][] testArray; testArray = new String[4][4]; testArray [0][0] = "a"; testArray[0][1] = "alpha"; testArray[1][0] = "b"; testArray[1][1] = "bravo"; testArray[2][0] = "c"; testArray[2][1] = "charlie"; testArray[3][0] = "d"; testArray[3][1] = "delta"; request.setAttribute("testTable", testArray); %> <display:table name="testTable" pagesize="2"> <display:column property="[0]" title="Column 1" /> <display:column property="[1]" title="Column 2" /> </display:table> </body> </html> ============================================== ______________________________________________________________________ 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 ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ displaytag-user mailing list displaytag-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/displaytag-user