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

Posted on 2007-10-11
Last Modified: 2013-11-24
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.

Question by:cs_chick99

    Author Comment

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

    LVL 26

    Expert Comment

    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.

    Author Comment

    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?
    LVL 26

    Accepted Solution

    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.


    Author Comment

    Thank you for your solution!
    LVL 26

    Expert Comment

    Glad to help, and good luck.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
    Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
    The viewer will learn how to implement Singleton Design Pattern in Java.
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now