I am closer to the fix. I had to extend tree2.HtmlTree and implement
processDecodes. I had to call processDecodes on all the component
children of the tree also -- these are the UIColumn(s). The structure of
the tree2 table in the jsp looks like this:
<my:tree2table>
<h:column> <---- this column contains a commandLink
<x:treeColumn>
<h:column>
<h:column>
<facet name="group">
<facet name="document">
<my:/tree2table>
The facets are the usual holders of the definitions for the tree node
types. The x:treeColumn is just a position marker for where the tree2
would be rendered. All components before the treeColumn would be
rendered in the beforeNodeEncode() and all components after the
treeColumn would be rendered in the afterNodeEncode().
Now what's happening is that the clientId of the HtmlLink (contained in
one of the columns of the tree table) doesn't match the clientId passed
in the request parametersMap (via hiddenLink param)
clientId= "_id0:server-tree:_id95" <------ this is the client id as
far as the component is concerned
reqValue= "_id0:server-tree:0:0:_id95" <------- this is the client id
passed in the form
It seems the component (HtmlLink) doesn't know it's position within the
tree. Any hints how to make the embedded component recognize that it is
at a certain node of the tree, so that it will return a clientId that
reflects its position in the tree?
-----Original Message-----
From: Sean Schofield [mailto:[EMAIL PROTECTED]
Sent: Monday, June 20, 2005 6:30 PM
To: MyFaces Discussion
Subject: Re: Tree2 Table custom renderer
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) <[EMAIL PROTECTED]> 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.
>
***********************************************************************
>
>
***********************************************************************
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.
***********************************************************************