Using jwcid Tapestry attribute and @Block component to classify CSS?

How does the Block component handle CSS classes? I have code like this:

<style type="text/css">
  .nameColumnHeader { width: 30%; }
  .nameColumnValue { width: 30%; vertical-align:top; }
</style>
...
<table>
  <tr>
    <th><span jwcid="nameColumnHeader@Block">...</span></th>
    <th><span jwcid="nameColumnValue@Block">...</span</th>
  </tr>
...
</table>

      

Ultimately, it looks like a job. Styles seem to be applied even if no class attribute is specified.

Why does it work? And wouldn't it be better to specify a class attribute (in terms of maintainability)? For now, though, with this kind of code in the entire application, is it worth "fixing" it?

+1


a source to share


1 answer


You are probably using the contrib: Table component - by default it applies the classes to it and generates (or perhaps in validation the generated markup).



The value for these classes is generated from each column name, so for the phone column they should be: phoneColumnHeader and phoneColumnValue ... It just happens that you have a similar jwcid (nameColumnHeader) added to the confusion.

0


a source







All Articles