{
TableModel getModel()
{
TableProperties props = TableProperties.getInstance(null);
TableModel model = new TableModel(props, "", null);
model.setRowListPage(model.getRowListFull());
{
HeaderCell ha = new HeaderCell();
ha.setTitle("ColumnAnt");
ha.setBeanPropertyName("ant");
ha.setHtmlAttributes(new HtmlAttributeMap());
ha.setGroup(1);
model.addColumnHeader(ha);
}
{
HeaderCell hb = new HeaderCell();
hb.setTitle("Column2");
hb.setHtmlAttributes(new HtmlAttributeMap());
hb.setBeanPropertyName("bee");
hb.setGroup(2);
model.addColumnHeader(hb);
}
{
HeaderCell hb = new HeaderCell();
hb.setTitle("long");
hb.setBeanPropertyName("camel");
hb.setTotaled(false);
HtmlAttributeMap mm = new HtmlAttributeMap();
mm.put(TagConstants.ATTRIBUTE_STYLE, "font-weight: bold; text-align: right");
mm.put(TagConstants.ATTRIBUTE_CLASS, new MultipleHtmlAttribute("right rowish"));
hb.setHtmlAttributes(mm);
model.addColumnHeader(hb);
}
{
HeaderCell hb = new HeaderCell();
hb.setTitle("Column3");
hb.setHtmlAttributes(new HtmlAttributeMap());
hb.setBeanPropertyName("two");
hb.setTotaled(true);
model.addColumnHeader(hb);
}
{
HeaderCell hb = new HeaderCell();
hb.setTitle("DateColumn");
hb.setHtmlAttributes(new HtmlAttributeMap());
hb.setBeanPropertyName("date");
model.addColumnHeader(hb);
}
model.addRow(new Row(new KnownValue(), 0));
model.addRow(new Row(new KnownValue(), 0));
model.addRow(new Row(new KnownValue(), 1));
KnownValue third = new KnownValue();
third.beeValue = "BeeAnt";
third.twoValue = 3;
third.camelValue = "arealllylongtextstringthatshouldforceafailuretowrapontheoutputlasdfasdfddine";
// third.camelValue = "a reallly long text string that should force a failure to wrap on the output line";
model.addRow(new Row(third, 2));
KnownValue antv = new KnownValue();
antv.antValue = "anteater";
antv.twoValue = 4;
model.addRow(new Row(antv, 3));
return model;
}