Group -
This might be a bug or it may be the result of how I'm using JMesa.
Either way, I think it is a good idea to make the group aware of it so
that it is at least documented.
I'm building a table using the tag library. In order to export, my
controller defines a similar table using the TableFacade and then
calls render. When ItemsImpl gets constructed, it calls
getPageItems. The limit passed in has a null RowSelect, so I get an
NPE when it hits limit.getRowSelect().getRowStart();.
To get around this, I'm new'ing a RowSelectImpl and explicitly placing
it on the Limit of the TableFacade.
Here is the snippet of code that handles the export:
<snip>
TableFacade tableFacade = new TableFacadeImpl(id,
context.getRequest());
if (tableFacade.getLimit().isExported()) {
tableFacade.setExportTypes(context.getResponse(),
ExportType.CSV, ExportType.EXCEL, ExportType.PDF);
tableFacade.setColumnProperties("collapsed", "
value.id",
"value.user.loginId", "value.status",
"value.createTime", "value.expirationTime",
"value.endTime", "value.remoteAddress",
"value.clientVersion", "value.user.fullName");
tableFacade.setItems(values);
tableFacade.getLimit().setRowSelect(new RowSelectImpl(1,
10000, rowcount));
tableFacade.render();
return null;
}
</snip>
Should I be constructing a RowSelect object or should this be handled
for me by a step I'm missing in the above snippet?
Thanks,
-Denny