display a grid with struts/tiles?

Discussion in 'Java' started by Elhanan, Oct 29, 2005.

  1. Elhanan

    Elhanan Guest

    hi... is there a way i can use to display an sortable, scrollable, html
    table with struts?
     
    Elhanan, Oct 29, 2005
    #1
    1. Advertising

  2. Elhanan

    Roedy Green Guest

    On 29 Oct 2005 14:40:54 -0700, "Elhanan" <> wrote,
    quoted or indirectly quoted someone who said :

    >hi... is there a way i can use to display an sortable, scrollable, html
    >table with struts?


    There is no such thing as a sortable table in HTML. You have to
    resend the table if you change the order.

    You could however display the table with a JApplet JTable. Then you
    can to the sorting, changing inserting etc an the client without
    sending the whole table each time.
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Java custom programming, consulting and coaching.
     
    Roedy Green, Oct 31, 2005
    #2
    1. Advertising

  3. Elhanan

    shawnews Guest

    "Elhanan" <> wrote in message
    news:...
    > hi... is there a way i can use to display an sortable, scrollable, html
    > table with struts?
    >

    A table can be sorted client side with javascript in some cases,( colspans
    and rowspans are problematic with the scripts I've tried) else you'll need
    to do it server side. The table can be placed inside div tags with the
    style set to "overflow: auto" to make it scrollable
     
    shawnews, Oct 31, 2005
    #3
  4. Elhanan

    Roedy Green Guest

    On Mon, 31 Oct 2005 04:34:59 GMT, "shawnews" <>
    wrote, quoted or indirectly quoted someone who said :

    >A table can be sorted client side with javascript in some cases,( colspans
    >and rowspans are problematic with the scripts I've tried) else you'll need
    >to do it server side. The table can be placed inside div tags with the
    >style set to "overflow: auto" to make it scrollable


    I think it would be masochistic to implement a full JTable in
    JavaScript where the server could insert, delete, replace, resort etc.

    The easiest way to do it with Java script would be to send the row
    data, and three int[] giving the orderings for three different sorts.
    Then have JavaScript just select the ordering and display in that
    order. That way you don't have to write a sort and comparators in
    JavaScript. The first array would just be the numbers { 0, 1 , 2 ... }
    and you would not actually bother to transmit it.

    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Java custom programming, consulting and coaching.
     
    Roedy Green, Oct 31, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sean Chou

    Struts Tiles

    Sean Chou, Jul 6, 2003, in forum: Java
    Replies:
    1
    Views:
    765
    Sean Chou
    Jul 11, 2003
  2. Jack
    Replies:
    7
    Views:
    2,578
  3. Jun
    Replies:
    1
    Views:
    1,358
    Wendy S
    Nov 17, 2003
  4. Conor
    Replies:
    0
    Views:
    942
    Conor
    Jan 15, 2004
  5. Rich M
    Replies:
    0
    Views:
    2,100
    Rich M
    Mar 5, 2004
Loading...

Share This Page