Tapestry
  1. Tapestry
  2. TAPESTRY-956

TableColumns and TableValues: impossible to assign different styles to different columns

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 4.0.1
    • Fix Version/s: 4.1.1
    • Component/s: Contrib
    • Labels:
      None
    • Environment:
      win xp, jdk15, tomcat 5.0.28

      Description

      I tried setting different column styles using solution proposed by MindBridge.

      I have the following in my .page file:

      <component id="tableValues" type="contrib:TableValues">
      <binding name="column" value="currColumn"/>
      <binding name="class" value="currColumnClass"/>
      </component>

      The problem is that although the currColumn gets correctly initialized with every column, the "getCurrColumnClass" method gets called just once, only for the first column, so every <td> tag gets the same "class"!

      The solution works with Tapestry 3.0, so I have modified the following method of TableValues (copied from version 3.0):

      public String getValueClass()

      { IBinding objClassBinding = getBinding("class"); if (objClassBinding != null) return objClassBinding.getObject().toString(); else return getTableColumn().getColumnName() + TABLE_VALUE_CSS_CLASS_SUFFIX; // if (isParameterBound("class")) // return getCellClass(); // // return getTableColumn().getColumnName() + TABLE_VALUE_CSS_CLASS_SUFFIX; }

      This way it works for me.

        Activity

        Hide
        Andreas Andreou added a comment -

        That's a duplicate of TAPESTRY-799, which is fixed for 4.0.3

        Show
        Andreas Andreou added a comment - That's a duplicate of TAPESTRY-799 , which is fixed for 4.0.3

          People

          • Assignee:
            Unassigned
            Reporter:
            Oleg Bondarenko
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development