tags:

views:

317

answers:

1

how to add some html tag between <displaytag:table> and </displaytag:table>. Plz help me to custom it, thank you very much.

 <displaytag:table>
     **<div class="mycss">**  

     <displaytag:column />
       <displaytag:column />

      **</div>**
    </displaytag:table>
A: 

Looking at the documentation it doesn't appear that you can put HTML tags there. Then again, even HTML itself doesn't allow a <div> tag directly inside a <table> tag, so I'm not sure why you'd want to do this.

According to the FAQ:

How can I display static headers in a table, so that headers remain visible while user scrolls the table body?

You can do that simply using css, adding an height and the overflow: scroll property to the tbody element. Unfortunately this will work perfectly in Netscape/Mozilla, but not in Internet Explorer.

A table with a scrollable body can be made in Internet Explorer using javascript or a more complex css. Here you can find a good css example.

And some more info here.

Eilon
I want to add scrollable capability for table that's generated by DisplayTag :)
Tr.Crab
@trcrab please see my updated answer. It appears that it's "sort of" possible, but it doesn't always work.
Eilon
thank for you help, it's cool, Is there another way to custom DisplayTag by extending java class (http://displaytag.sourceforge.net/11/displaytag/apidocs/overview-summary.html )
Tr.Crab
@trcrab sorry I don't know. I'm not actually familiar with DisplayTag at all - I just learned about it 1 hour ago :)
Eilon