You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Richard Wallace <rw...@thewallacepack.net> on 2006/03/13 18:11:34 UTC

[shale] Back to t:column styleClass attribute

Ok, I've updated to the 20060313 release and the LoadBundle issues are 
definitely fixed.  Good job!

But I'm still having an issue with my t:columns not getting the class 
set at all.  I've uploaded a simple example that produces the problem to 
www.thewallacepack.net/shale-style-per-cell.tar.gz.

In short, I have a table and columns configured in my clay-config.xml with:

  <component jsfid="testTable" extends="t:dataTable">
    <attributes>
      <set name="value" value="#{@managed-bean-name.testTableData}" />
      <set name="var" value="data" />
    </attributes>
    <element renderId="1" jsfid="testTableColumn1" />
    <element renderId="2" jsfid="testTableColumn2" />
  </component>
 
  <component jsfid="testTableColumn1" extends="t:column">
    <attributes>
      <set name="styleClass" value="#{data.columnOneStyle}" />
    </attributes>
    <element renderId="1" jsfid="outputText" facetName="header">
      <attributes>
        <set name="value" value="Column 1" />
      </attributes>
    </element>
    <element renderId="2" jsfid="outputText">
      <attributes>
        <set name="value" value="#{data.columnOneStyle}" />
      </attributes>
    </element>
  </component>

The testTableData just returns a simply constructed ListDataModel with a 
simple object that has two fields, columnOneStyle and columnTwoStyle.  
The list is constructed with 2 entries, { "one", "two" } and {"two", 
"three" }.  So the rendered table should look like:

<table>
  <tr>
    <th>Column 1</th>
    <th>Column 2</th>
  </tr>
  <tr>
    <td class="one">one</td>
    <td class="two">two</td>
  </tr>
  <tr>
    <td class="two">two</td>
    <td class="three">three</td>
   </tr>
</table>


Instead, it is rendered without the class attributes on the <td> 
elements at all.  Any idea why this might be?  Gary, I know you said 
that you had a test case where the class was being produced.  Could you 
maybe post that somewhere so I can take a look and see if I'm missing 
something?

Thanks again,
Rich

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org