Meaning you want to inject colspans on individual rows, depending on
if there are multiple values?  If so, I think you are on your own, but
I'm something of a tap newb, so don't trust my opinion on that score.

If you just mean that before rendering the table, you want to be able
to desginate the number (and name) of columns, then that is trivial to
do.  The TapestryTables.war tutorial webapp has a nice example, but
the simple explanation is to replace the literal value for the columns
binding with an ognl expression that calls a method of your page. 
Your method can then return a string designating the appropriate
number of columns, and the table will subsequently render correctly.

I can't recommend the TapestryTables.war  examples highly enough. 
There are links from the wiki which you can get to from
http://jakarta.apache.org/tapestry

Or google it.

But I would think this is more of a tap-users question than a tap-dev
one, for future reference, since it isn't about developing tapestry,
it is about developing with tapestry.

--sam


On 3/30/06, Ginny <[EMAIL PROTECTED]> wrote:
> Hi Guys,
>
> This is my first post, I was just wondering, can anybody provide me some
> examples about "Adding dynamic columns to the table component"
>
> This is how my page definiton looks like
>
>     <component id="testTable" type="contrib:Table">
>         <binding name="source" value="reports"/>
>         <binding name="columns"
> value="literal:displayName:Name:reportSpec.displayName"/>
>     </component>
>
> My table can have 1 or 2 columns "Name" and a second column which is dynamic,
> it depends on the boolean property which is set on the ReportSpec object.
>
> for e.g. if reportSpec.showCount is true then the column would show "Count" in
> the title and value is reportSpec.count
>
> Is there a way to add dynamic columns to the table component or I need to
> write my own table component.
>
> I really appreciate for all the help that I can get.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to