Have you searched the archives for the discussions I referenced? They outline some of the problems. Once you are up to speed on those issues let me know if you think you have the time and expertise to help with this. Ideally we get several people to help out.
sean On 6/21/05, Rahul Pilani <[EMAIL PROTECTED]> wrote: > What help would you require for a solution to this problem? > > -----Original Message----- > From: Sean Schofield [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 21, 2005 1:25 PM > To: MyFaces Discussion > Subject: Re: HtmlTree in org.apache.myfaces.custom.tree2 > > Ahh I see. > > There has been talk of maintaining the expanded state outside of the > component (basically per node, or something like that.) There are > drawbacks to that approach (see archives for earlier discussions.) > > sean > > On 6/21/05, Rahul Pilani <[EMAIL PROTECTED]> wrote: > > > > >If you always want the node to be expanded why not just have > > >isNodeExpanded return true? > > > > > >Also, you seem to be trying to toggle the expanded state in > > >isNodeExpanded. That sounds like a recipe for trouble ;-) This > > >method is used to *check* if the node is expanded or not. You don't > > >know how many times or what will prompt this check. isNodeExpanded is > > >essentially a "getter" method. If you decide to override a getter > > >method and have it do "setter" stuff you are doing so at your own > > >risk. > > > > > >sean > > > > I did that and it works. The problem with that approach is that, the nav > > buttons (namely the "-" button) still shows, and people would want to > click > > on it to collapse the tree again. If they do, myfaces throws an error, > > because the toggle method tries to remove nodes from the expanded list > > which are not there. > > > > Rahul > > > > > >

