<%@ taglib prefix="define" uri="/WEB-INF/bebop-define.tld" %> <%@ taglib prefix="show" uri="/WEB-INF/bebop-show.tld" %> <%@ page import="com.arsdigita.bebop.*" %> <%@ page import="com.arsdigita.bebop.form.*" %> <%@ page import="com.arsdigita.bebop.event.*" %> <% Object tableValues[][] = new Object[][] { {"Bill Schneider", "bschneid@arsdigita.com", "developer"}, {"Doug Harris", "dharris@arsdigita.com", "developer"}, {"Roger Metcalf", "rmetcalf@arsdigita.com", "developer"}, {"Rich James", "rjames@arsdigita.com", "sales/marketing"}, {"Harry Greenspun", "harryg@arsdigita.com", "VP sales"} }; Object tableHeaders[] = new Object[] { "Name", "Email", "title" }; Table t = new Table(tableValues, tableHeaders); t.setIdAttr("myTable"); p.add(t); %> This is a demonstration of using JSP to style the contents of a model-backed Table. The <show:table>, <show:thead>, <show:tbody>, and <show:row> tags iterate over the rows and columns of data from the model and the <show:col/> places the component for an individual table column.

If the Table contains a cell renderer, the <show:col/> contents will be globally styled according to the rules for whatever component is there.

Note that any HTML <tr> and <td> tags must be manually placed. But this is a good thing because then a regular JSP/HTML editor can modify table colors, spacing, etc. <show:col>,