IMO supporting tree2 with treeColumn would be *much* easier.  The
javascript to support client-side toggle is extremely complicated -
you wouldn't want to start over with that.  Also there is other cools
stuff in tree2 besides hide root and client-side toggle.

Yes the refactoring is checked in.  There are several protected
methods that allow you to call stuff before, during and after the
encoding of the current node.  The approach I took was to write a
separate renderer and tag (x:tree2Table).  No new component was
required.  Then in the HtmlTreeTableRenderer (which extended
HtmlTreeRenderer) I wrote out the cells that surrounded the table,
etc.

Suggestion, don't worry about fancy formatting with passthrough
attribute, etc.  Just see if you can pull it off with a table with
default border, etc.  The trick will be to write the javscript such
that you can hide and expand the correct row in the table *and* still
not have to change anything in HtmlTreeRenderer so that tree2 remains
intact.  If you are serious about this, I can look for my old files to
get you started (no guarantees I can find them.)

If you search the archives you will see we had a discussion about
adding treecolumn to tree2.  Perhaps you can link up with these people
and see if they would like to help you.  Let me know if you come up
with something.  It would make a nice addition to MyFaces if you can
pull it off ;-)

sean


On 5/4/05, Virtudazo, Dennis (Exchange) <[EMAIL PROTECTED]> wrote:
> Which one would be easier:
> 
> - support tree2 with treeColumn
> 
> Or
> 
> - add hideRoot, & client-side expansion to tree?
> 
> The refactoring you're talking about, is this checked-in and in the
> latest source?
> 
> -----Original Message-----
> From: Sean Schofield [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 04, 2005 3:54 PM
> To: MyFaces Discussion
> Subject: Re: tree2 with treeColumn?
> 
> > is it possible to use treeColumn with tree2 to create a tree table?
> 
> No.  Not yet anyways ;-)
> 
> I started to work on this and I refactored tree2 to make it easier.  I
> made a good deal of progress but then we decided to keep tree and
> tree2 (instead of merging the two) so I lost interest.
> 
> I think a tree inside a table has limited usefulness but several users
> seem to think its a good idea.  Like I said, I have done a lot of the
> refactoring work necessary behind the scenes so the right methods can be
> overridden.
> 
> If you (or someone else) wants to take a stab at it, I'd be happy to
> take a look.  One issue I think I was having trouble with was making it
> support both client and server-side toggle inside the table.
> Hiding the table rows, etc. in the javascript mode was a bit messy.
> 
> sean
> 
> ***********************************************************************
> 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.
> ***********************************************************************
> 
>

Reply via email to