How do I export my displayed table using the display tag library? Links not visible when using Tiles

Hi there,

I am trying to use the display tag open source library to display a table and export the data
to Excel. I am/have:
- using Tiles
- using displaytag-1.1.jar
- set up the filter in web.xml

I am able to display the table, do paging, sorting etc successfully.

When I view the page (using Tiles), the options/links to export appear to be blank as seen in
the screenshot (Figure 1).

HOWEVER, when I view the page (directly viewing the JSP without using Tiles), the options/links
to export are visible. (Figure 2)

THE STRANGE PART: In Figure 1, the links to export do not appear to be there. BUT, if I copy
that part of the screen in the browser and paste it into Notepad, the links are shown! For
In the browser, it looks like:
      "Export to: | | |"
If I copy and paste this from the browser into Notepad, it looks like:
      "Export options: CSV | Excel |"

PROBLEM: Export links do not appear in the browser when using Tiles (but when pasted into Notepad,
the links appear to be there) How do I get the export link options to appear in the browser when using Tiles?

Does anyone have any solution or suggestions to resolve this?

Thank you so much for your help. If there are any details or questions you may have, please
let me know.


NOTE: I'm not sure if the file is being picked up. The label change in the export banner I am able to change using the .properties file. However, I have modified to only have excel export but CSP and XML export also show up.

Who is Participating?
Try playing with the HTML files until your links display the way you want them to display.  You can do this by doing view source in the browser, then saving the HTML code as a local page.

If the links are being generated, as you've confirmed, then they're not showing up for some reason, probably related to styling.

If the page looks the way you want in the browser, then I'd compare the HTML from the browser vs. the HTML from the Tiles view.  Start playing with all of the CSS declarations that might affect the display of the links.

If you have the WebDeveloper extension for Firefox, or the IE Developer toolbar, then those will help tell you which css elements are applied to a specific element on a page.

If you have Dreamweaver or other Web design tool, that also would be a help in debugging why the Tiles environment makes your link text disappear.

cs_chick99Author Commented:
My apologies on the image references. I thought we would be able to attach files for reference.

It sounds as if the links might be all right, but the stylesheet for Tiles is conflicting with something.

I would do a view source on the page (from Tiles and without Tiles) and check to see that the links are truly there.  If they are in the HTML for the page, then it's most likely a CSS issue.
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

cs_chick99Author Commented:
The source contains the links (same in Tiled and Untiled versions):

<td class="fw_cssTableRow">342</td></tr></tbody></table><div align="left">Export to:
<a href="?6578706f7274=1&amp;d-49653-e=1"><span class="export csv">CSV </span></a>|
<a href="?6578706f7274=1&amp;d-49653-e=2"><span class="export excel">Excel </span></a>|
<a href="?6578706f7274=1&amp;d-49653-e=3"><span class="export xml">XML </span></a></div>

Should I add a stylesheet for class 'export excel' you mean?

I tried creating one which contains:

.export excel
      font-size: 12px;
      font-style: oblique;

but it still does not display.

Any suggestions?
cs_chick99Author Commented:
Thank you for your solution!
Glad to help, and good luck.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.