You must know all of the possible facet types in advance. You don't have to know how many of each type you will have (that part can be dynamic) but you do need to know the finite list of possible facets (foo-folder, etc.)
If you don't want to customize based on the node type you could just make all of your nodes report the same "generic" type and just implement a single facet. Currently there is no automatic default facet if it can't find one. IMO you've got maximum flexability here. You can customize the look of the node based on the type or just give the same look to all nodes. sean On 6/6/05, CHAUDHURI, Neil <[EMAIL PROTECTED]> wrote: > One point I forgot to mention......in Sean's sample JSP where he renders > Tree2, he has a <f:facet> tag for each type parameter in the tree (e.g. > person, foo-folder, etc). Because the contents of the tree are being > generated from a database, I do not know in advance what the type > parameters are. Therefore, any guidance on how to name the facets will > be much appreciated. > > Also, every TreeNodeBase object has the type and description parameters > (the first two parameters in the constructor) the same. May this be the > source of some trouble? > > Thanks again. > > Neil > > -----Original Message----- > From: CHAUDHURI, Neil [mailto:[EMAIL PROTECTED] > Sent: Monday, June 06, 2005 5:37 PM > To: MyFaces Discussion > Subject: Tree2 Facets > > I have created a backer bean for Sean's Tree2 component, and I have unit > tested it to verify its contents are as they should be. However, when I > attempt to render it, I find an error "Unable to locate facet with the > name:" and then the description of the first child in the tree to be > rendered. Clearly I am unclear on the JSF tags necessary to render the > tree correctly, and I have been unable to locate literature on the > subject. I would appreciate any insight into the meaning of that error > message and where I can find the Tree2 documentation. Thanks so much. >

