DisplayTag
  1. DisplayTag
  2. DISPL-110

Ability to highlight selected table row

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0 RC1
    • Fix Version/s: 1.1
    • Component/s: Decorators, HTML Generation
    • Labels:
      None

      Description

      ====
      imported from sf tracker
      id 810796
      submitted by Bernard Farrell - bernfarr
      http://sourceforge.net/support/tracker.php?aid=810796
      ====

      It would be good to provide a means to highlight (via
      CSS tags, ideally) the row on the table that has been
      selected.

      Ideally it would be good if the row selection (by clicking
      on a given row) would automatically do this highlighting,
      though I think that might be more interaction than would
      be needed by most table users.

      Also, I could see where developers would like facilities to
      select an entire row, entire column, or a specific cell.

      ===

      Date: 2004-03-26 10:52
      Sender: knuterikb
      Logged In: YES
      user_id=364080

      I suppose this could be implemented in a table decorator by
      comparing the request parameters with the
      paramId/paramProperty pair, and if they match, you could
      change the style for the row in question.
      - Maybe this functionality is also so generic that it should be
      included in the default tag implementation, e.g. with a
      styleClassSelectedRow="myStyleClass" parameter for the tag.

      I would also like access to this kind of functionality, and will
      look into it if I can spare the time...

      ===

      Date: 2004-04-05 21:11
      Sender: knuterikb
      Logged In: YES
      user_id=364080

      I have just finished making this functionality as a patch that
      we use in a project I am working on.

      Ideally this functionality should maybe have a parameter by
      it's own, but because I had little time available I had to
      integrate it in the decorator parameter.

      example:
      <display:table .... decorator="highlightSelectedRow,param" >

      The patch then matched the request parameters (already
      clicked link) with the links that are produced by the cells in
      the table. At the first match, the row in question is
      highlighted. This means that if multiple rows link to the same
      location, and not the first row containing this link is clicked,
      the wrong row is selected. This is not a problem in my
      application, but could be an issue for others...

      ...any way, I could send the patch to anyone interested.

        Activity

        Hide
        fabrizio giustina added a comment -
        Thanks for the patch, I will try to commitit asap
        Show
        fabrizio giustina added a comment - Thanks for the patch, I will try to commitit asap
        Hide
        Emilio Dolce added a comment -
        I think that the solution provided with DISPL-267 is more flexible because let you decorate more that a simple css (onclick, onmouseover, etc...).
        Show
        Emilio Dolce added a comment - I think that the solution provided with DISPL-267 is more flexible because let you decorate more that a simple css (onclick, onmouseover, etc...).
        Hide
        fabrizio giustina added a comment -
        In cvs.
        You can use the addRowClass() and addRowId() callbacks in TableDecorator to specificy a different class or id for each row. Check the sample application for an example on how to do this easily.
        Show
        fabrizio giustina added a comment - In cvs. You can use the addRowClass() and addRowId() callbacks in TableDecorator to specificy a different class or id for each row. Check the sample application for an example on how to do this easily.
        Hide
        selvi added a comment -
        can anyone send the correct code to implement the row highlight in displaytag table
        Show
        selvi added a comment - can anyone send the correct code to implement the row highlight in displaytag table
        Hide
        Matt Raible added a comment -
        I use JavaScript to implement highlight rows:

        http://raibledesigns.com/rd/entry/displaytag_changing_a_row_s
        Show
        Matt Raible added a comment - I use JavaScript to implement highlight rows: http://raibledesigns.com/rd/entry/displaytag_changing_a_row_s

          People

          • Reporter:
            fabrizio giustina
          • Votes:
            5 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: