DisplayTag
  1. DisplayTag
  2. DISPL-379

Grouping is performned by default if you don't define any columns

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 1.2
    • Component/s: Tag Library
    • Labels:
      None
    • Application server:
      oc4j 9.0.4

      Description

      Steps:
      * Define a table but don't define any columns
      * The columns are grouped as if you've specified group=1 etc on each of the columns

      This did not happen in version 1.0 and is contrary to the documentation for display:column "If this attribute is not included, then no grouping is performed."

      See attached for jsp to reproduce the error.

      I'm using no columns for a page that runs user defined sql reports. I could specify the columns by iterating over the first row but don't want to as its more code and this used to work fine.
      1. ColumnGroup.jsp
        1 kB
        Anthony Gerrard
      2. DISPL-379.patch
        0.5 kB
        Michael Osipov

        Activity

        Hide
        Jeremy Blythe added a comment -
        I have this problem too. You can workaround this problem with a decorator that sets the group to -1 for all the HeaderCells like this:
        {code}
            public void init(PageContext context, Object decorated, TableModel tableModel)
            {
                super.init(context, decorated, tableModel);

                for (Iterator it = tableModel.getHeaderCellList().iterator(); it.hasNext();) {
                    HeaderCell cell = (HeaderCell) it.next();
                    cell.setGroup(-1);
                }
            }
        {code}
        Show
        Jeremy Blythe added a comment - I have this problem too. You can workaround this problem with a decorator that sets the group to -1 for all the HeaderCells like this: {code}     public void init(PageContext context, Object decorated, TableModel tableModel)     {         super.init(context, decorated, tableModel);         for (Iterator it = tableModel.getHeaderCellList().iterator(); it.hasNext();) {             HeaderCell cell = (HeaderCell) it.next();             cell.setGroup(-1);         }     } {code}
        Hide
        Antony Stubbs added a comment -
        I hit this issue straight away - first time using the library. Quite off putting as it seemed to output rubbish. I was about to throw it out straight away when i thought I'd just browse the bug log - and look what I found!
        Show
        Antony Stubbs added a comment - I hit this issue straight away - first time using the library. Quite off putting as it seemed to output rubbish. I was about to throw it out straight away when i thought I'd just browse the bug log - and look what I found!
        Hide
        Michael Osipov added a comment -
        I ran into this problem last week too. Well, the problem ist extremely easy to fix. Don't unterstand why no one of you took it on.
        Show
        Michael Osipov added a comment - I ran into this problem last week too. Well, the problem ist extremely easy to fix. Don't unterstand why no one of you took it on.
        Hide
        Michael Osipov added a comment -
        Patched against tag 1.1.1
        Show
        Michael Osipov added a comment - Patched against tag 1.1.1
        Hide
        fabrizio giustina added a comment -
        Patch added to 1.2, thanks
        Show
        fabrizio giustina added a comment - Patch added to 1.2, thanks

          People

          • Reporter:
            Anthony Gerrard
          • Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: