I am not a table user (never used this component, so I was also never really followed postings about it), so maybe robert can help better on that...

Anyway, the SimpleTableColumn implements the interface IAdvancedTableColumn, with methods

ITableRendererSource getColumnRendererSource();
void setColumnRendererSource(ITableRendererSource columnRendererSource);

that means: the column header will be rendered by the component delivered from this object.

The ITableRendererSource component itself looks like that:

public IRender getRenderer(
                IRequestCycle objCycle,
                ITableModelSource objSource,
                ITableColumn objColumn,
                Object objRow);

When you create the SimpleTableColumn, you should use another component source than the default one.

IComponent extends IRender so you should just give a Block component back which renders the table's current column header - so, it includes a DirectLink with statefull=true and listener on the sort method.

Now I also know why I never used the table component...
Its more JSF style than Tapestry style, thow, very very suffisticated, I guess too suffisticated for me...

Cheers,
Ron


yamsterdamer wrote:
Almost: mulitple contrib:Tables in a costume BaseComponent in a loop in a page.
I'm using tapestry 4 beta 13.

And to Ron - It's kind of a lot to post, surely more than 3 pages - But the 
basic idea is that I'm implementing myself IBasicTableModel, my rows are my own 
Object and I create columns myself (SimpleTableColumns) and return them as 
SimpleTableColumnModel.
The rest is contrib's.
Anyway, it doesn't matter if i'll have to change the use of the table, I just 
want to have control over it's behavior.

<div jwcid="[EMAIL PROTECTED]:TableView" source="ognl:tableChecked" 
columns="ognl:columns">
<tr>
<span jwcid="[EMAIL PROTECTED]:TableColumns" element="th" class="status" />
</tr>
<tr jwcid="[EMAIL PROTECTED]:TableRows" class="ognl:rowClass" 
row="ognl:currentRowObj">

Thanks,
Yael.


Robert Zeigler wrote:

Yael,

Let me make sure I've got this right:
You're rendering multiple contrib:Table components in a page, in a loop, right? So then when you go to click on any one of the tables' sort columns, you wind up with issues, right?
What version of tapestry are you using?

Robert





-------------------- m2f --------------------

Sent from www.TapestryForums.com

Read this topic online here: <<topic_link>>

http://www.tapestryforums.com/viewtopic.php?p=13426#13426

-------------------- m2f --------------------





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

Reply via email to