2

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?

MozenRath
  • 9,652
  • 13
  • 61
  • 104
Rakesh Juyal
  • 35,919
  • 68
  • 173
  • 214
  • 1
    `Displaytag:` http://displaytag.sourceforge.net/1.2/ – Rakesh Juyal Dec 02 '09 at 09:23
  • What the heck, i used the `displaytag` tag and it is david who removed that tag from the question. Anyways does it make any sense `Maybe you should ask someone who works on display tag?` In SO there are lots of question related to `Displaytag`. How could i know that the person who will try to answer don't even know displaytag and still want to answer. – Rakesh Juyal Dec 02 '09 at 10:42
  • There updated your question to have the correct tagging, like you originally had it, other than that good luck, never heard of this product. – JL. Dec 02 '09 at 10:57
  • If you don't know what X is but you're interested to know about, just Google X and move along. This kind of comments only clutters and distracts the whole question (sigh). – BalusC Mar 16 '10 at 15:49

1 Answers1

2

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:

<display:column titleKey="something" media="html">

       <c:out_of_property_here>

</display:column>

If I remember correctly, if my table was defined like:

<display:table name="test" requestURI="some_uri"
    defaultsort="0" id="test" export="true" excludedParams="*" >

you would access the current element using test, so if the object you are displaying has a property id with a getter getId, you would access the current object in the list by writing test.id.

But I would try using a decorator first (you can add decorators per-column iirc), the second option is very messy.

laura
  • 7,280
  • 4
  • 35
  • 43