If you have a TreeNode whose type field is set to "foo-folder", then the
Tree2 component expects there to be a corresponding facet whose name is
"foo-folder".  If you have a TreeNode whose type field is set to
"foo-folder1", then the Tree2 component expects there to be a
corresponding facet whose name is "foo-folder1".  If you have a TreeNode
whose type field is set to "abc", then the Tree2 component expects there
to be a corresponding facet whose name is "abc".

- Brendan

-----Original Message-----
From: Anu Padki [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 20, 2005 3:22 PM
To: MyFaces Discussion
Subject: RE: tree2 facets help!


Thanks for yr reply. May be my question is not right.
The prob is this.
Let me tell you where I get the facet idea.
If I write in the treeabacker foo-folser1 instead of foo-folder and
again 
the same in tree2.jsp.
I get the error message

java.lang.IllegalArgumentException: Unable to locate facet with the
name: 
foo-folder1
 
org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeCurrentNode(HtmlT
reeRenderer.java:318)
 
org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeTree(HtmlTreeRend
erer.java:249)
 
org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeChildren(HtmlTree
Renderer.java:201)
 
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.jav
a:701)
Please shed some light on this. I really appreciate it.
- Anu

At 02:57 PM 10/20/2005 -0500, you wrote:
>There is no predefined facet for tree2.  As outlined in my prior
e-mail,
>*you* are the one who determines which facets you want to support.  The
>rule is there must be a facet for each type of node that you define.
>(Each node has a type attribute, and you set this to whatever String
you
>want.)
>
>- Brendan
>
>-----Original Message-----
>From: Anu Padki [mailto:[EMAIL PROTECTED]
>Sent: Thursday, October 20, 2005 2:43 PM
>To: [email protected]
>Subject: tree2 facets help!
>
>
>How do I find all the facets that I can use for tree2 ?
>I am combing thru the myfaces code, but no luck.
>Please help.
>- Anu


Reply via email to