Menu

Export The Table

Help
javauser
2004-08-26
2012-10-09
  • javauser

    javauser - 2004-08-26

    Hi All,

    Displaytag is working fine for me.I wanted to whether while exporting the table to csv,excel,xml
    how can I omit the anchor tags and display only column value.
    ie.,<a href="details.jsp">TEST</a>
    I want to import only TEST omiiting the anchor how to do that.

    Thanks
    javauser

     
    • Matt Raible

      Matt Raible - 2004-08-26

      Define two columns with different media attributes.

       
    • Chenna

      Chenna - 2006-05-11

      I am facing the same problem , if i define two columns with different meadia attibutes then i will get two columns while displaying the page? please let me know more clearly

       
      • kurtfi

        kurtfi - 2006-05-16

        One way is to use a custom columndecorator and in that decorator handle link formatting and different media types. For example:

        (LinkObject is a class with two properties, text and url.)

        if (column instanceof LinkObject) {
        LinkObject link = (LinkObject) column;
        if (media.equals(MediaTypeEnum.HTML)) {
        return "<a href=\"" + link.getUrl() + "\">" + link.getText() + "</a>";
        } else {
        return link.getText();
        }
        }
        if (column instanceof otherType......

         

Log in to post a comment.