You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Yunfeng Hou <ho...@yahoo.com> on 2005/07/22 07:31:52 UTC
patch to table component
I found contrib:table very useful, however, I do not
like the way how to render column block. It will force
to use name as fooColumnValue to replace the default
column renderer. Even worse, if I have two table
components on the same page, column names chould have
conflicts. So I decide to patch it a little to avoid
this.
Here's what I did:
1. add ColumnBlock component, which has table, column
and isHeader parameters
2. For TableColumnModelSourceImpl, add logic to set
column renders with ColumnBlock defined.
Now the template looks like:
<table jwcid="persons@contrib:Table"
source="ognl:rows" columns="name,age">
<span jwcid="name@contrib:ColumnBlock"
table="persons">
<span jwcid="@Insert"
value="ognl:components.persons.tableRow.name.toUpperCase()"
/>
</span>
<span jwcid="@contrib:ColumnBlock" table="persons"
column="age" >
<span jwcid="@Insert"
value="ognl:components.persons.tableRow.age*2" />
</span>
</table>
hope this is useful.
Yunfeng Hou
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs