You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Virtudazo, Dennis (Exchange)" <dv...@bear.com> on 2005/06/20 22:07:19 UTC

Tree2 Table custom renderer

Hi,

Maybe somebocy can give me a hint how to fix a bug in my custom
renderer.

I have created a renderer that extends the tree2 HtmlTreeRenderer.
Basically everything displays correctly -- all the columns in the table,
with one column holding the tree2. I have only done server-side
expand/collapse for now. My problem is that none of the value bindings
of actions on the components outside the tree2 (on the other columns of
the table) are getting invoked.

For example I have a commandLink with an action on one of the columns
and it renders correctly as a link but clicking on it has no effect.
The link on the tree leaf document itself is working.

Any ideas??


***********************************************************************
Bear Stearns is not responsible for any recommendation, solicitation, 
offer or agreement or any information about any transaction, customer 
account or account activity contained in this communication.
***********************************************************************


Re: Tree2 Table custom renderer

Posted by Sean Schofield <se...@gmail.com>.
Most likely there is a problem with how your events are being queued. 
Since the table is responsible for rendering its own children, its
also responsible for informing it of any relevant events that might
pertain to the children.

Take a look at the queueEvent method of UITreeData.  It takes the
events and creates a wrapper which stores the current node
information.  Then when broadcast method is called,  it broadcasts the
event to the correct component within the tree.

Most likely you need to do something similar to handle the stuff in
the rows of your table.  Take a look at how a regular datatable works
by looking at either the RI or MyFaces source for h:dataTable.

HTH,

sean


On 6/20/05, Virtudazo, Dennis (Exchange) <dv...@bear.com> wrote:
> Hi,
> 
> Maybe somebocy can give me a hint how to fix a bug in my custom
> renderer.
> 
> I have created a renderer that extends the tree2 HtmlTreeRenderer.
> Basically everything displays correctly -- all the columns in the table,
> with one column holding the tree2. I have only done server-side
> expand/collapse for now. My problem is that none of the value bindings
> of actions on the components outside the tree2 (on the other columns of
> the table) are getting invoked.
> 
> For example I have a commandLink with an action on one of the columns
> and it renders correctly as a link but clicking on it has no effect.
> The link on the tree leaf document itself is working.
> 
> Any ideas??
> 
> 
> ***********************************************************************
> Bear Stearns is not responsible for any recommendation, solicitation,
> offer or agreement or any information about any transaction, customer
> account or account activity contained in this communication.
> ***********************************************************************
> 
>