Menu

Export Links with Fixed Table Header

Help
arbrown1
2008-08-11
2012-10-09
  • arbrown1

    arbrown1 - 2008-08-11

    I've got my Displaytag tables set up to always display the column headers at the top of the table, regardless of where you scroll within the table. However, when I have the options checked to allow for exports, the export links are at the bottom of this scrollable table, and are therefore not visible unless I scroll to the bottom of the displaytag table itself. Is there a way to ensure that the export links are always visible on a table with a fixed header?

    Thanks in advance.

     
    • wecansolveit.org

      great find man!

      this really helped me to apply my custom style sheet and take out the export links.

      I applied javascript to automatically adjust the table width and height based on the user's screens available space!

      Thanks a bunch!

      Cheers
      Krishna

       
    • arbrown1

      arbrown1 - 2008-08-11

      Alright, I found a solution to this. Assuming that you're using the <div> tag method to get a fixed table header (talked about quite a bit on these boards), the easiest way to do it is to modify your displaytag.properties file for the project in question. You'll be looking for a line in it that looks something like:

      export.banner=<div class="exportlinks">Export options: {0}</div>

      To get the Export links outside of the scrollable area, you basically just need to close the overall <div> tag that you added to make the scrollable table BEFORE instantiating the 'exportlinks' div tag above. So, instead of closing the </div> tag in the jsp after the <display:table> portions of the jsp, you do it in the export.banner definition in your properties file:

      export.banner=</div><div class="exportlinks">Export options: {0}</div>

      Using the 'exportlinks' style class, you can then customize the appearance to your heart's content.

      I hope this helps anyone else who ran into a similar situation.

       
      • wecansolveit.org

        arbrown1,

        When you said that you got the static header thing working, do you mean that it is working in all the browsers? I only see my DIV based CSS working in FireFox alone and buggy in IE7. I had to use another CSS for IE based browsers, so essentially two CSS for IE and non-IE browsers. I will post it once I am done testing.

        Is it possible for you to post your CSS please?

        Cheers
        Krishna

         

Log in to post a comment.