Menu

Sorting and Exporting

Help
nitz
2007-04-17
2012-10-09
  • nitz

    nitz - 2007-04-17

    Hi,

    I am new to display tags. Found it amazing.
    So much of development time reduced.Thanks to
    all its developers.

    I have a small problem now
    I have a table of which last row should have summation of all the column.
    this last row shouldnt get sorted.

    example would be

    name apr may jun total
    a 100 100 100 100
    b 100 100 100 100
    total 200 200 200 200

    now the last row shouldnt get sorted when i click on column header.

     
    • nitz

      nitz - 2007-04-18

      when i give media="excel pdf html" i can see footer in my jsp.
      but not in the pdf and excel files generated.
      is there anything i am missing ... i have been trying to figure this out the whole day today.

       
    • Akram BEN AISSI

      Akram BEN AISSI - 2007-04-17

      Displaytag can do this for you, with the "totals" function. Just add this to your display:table .
      There is a small bug, that makes total incomplete sometimes, you can workaround by setting a defaultsort on your table.

      <display:footer >
      <div class="table-footer" ><b>Total : <c:out value="${totals.column6}" /></b></td>
      </display:footer>

       
    • nitz

      nitz - 2007-04-18

      Hi Akram,

      Thanks for the reply.

      I tried this and this works i get the total but it is not getting exported.
      i didnt understand the workaround of setting a defaultsort on the table.
      any idea how i can achieve export feature.

       
    • nitz

      nitz - 2007-04-18

      Thanks Akram,

      I used the footer but its still not exporting it to PDF and Excel files.

       

Log in to post a comment.