I have to create a table, whose structure is like this
|--------------------------------| |col1|col2| col3 |col4| | | | col3.1 | col3.2 | | |----|----|--------|--------|----| |----|----|--------|--------|----|
Is it possible to create such a datagrid using display tag?
Check out the decorator examples (http://displaytag.sourceforge.net/1.2/tut_decorators.html), that is your best bet.
Another way to do it is to add the content of the cell manually, like so:
If I remember correctly, if my table was defined like:
you would access the current element using
test
, so if the object you are displaying has a propertyid
with a gettergetId
, you would access the current object in the list by writingtest.id
.But I would try using a decorator first (you can add decorators per-column iirc), the second option is very messy.