You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Cosma Colanicchia <co...@gmail.com> on 2006/07/06 10:02:18 UTC

Re: tree 2 is not a dynamic tree

Hi Sarma,

the facet are for "node types", not for "nodes". This way, you define
in your view how a node type has to be displayed (which is the right
place to do that IMO). For example, you can have two node type,
"person" and "department", and use a different icon for the two. The
correct facet will be automatically picked by the tree2 while
rendering looking at the node tye attribute.

Bye
Cosma


2006/7/6, sarma <ss...@mahindrabt.com>:
>
> hi,
>   in sun stdio creator   i am getting a dynamic tree  without using facets
>
>  in tree 2 we have to declare all  nodes names in <facet> like this
> <f:facet name="person">
>   in java code
>  TreeNodeBase personNode = new TreeNodeBase("person", "Frank Foo", false);
>
> why  i should declare facet for every  nodes in jsp.
> then how we can call it  as  a  dynamic tree.
>
> how to make tree with out using facets.
>
> like in sun stdio creatror ide
> if there is any possibility.
> with regards
> shannu sarma
> --
> View this message in context: http://www.nabble.com/tree-2-is-not--a-dynamic-tree-tf1899088.html#a5195222
> Sent from the MyFaces - Users forum at Nabble.com.
>
>

Re: tree 2 is not a dynamic tree

Posted by Andrew Robinson <an...@gmail.com>.
Or use binding and create the facets and the components in them
programmatically, there are many examples on the web for creating
components this way.

On 7/7/06, Cosma Colanicchia <co...@gmail.com> wrote:
> As Andrew said, you can always use a single node type (only one
> facet), and inside of it apply your presentation logic looking at the
> node properties.
>
> Cosma
>
>
> 2006/7/7, sarma <ss...@mahindrabt.com>:
> >
> > Hi,
> >   the facet are for "node types", not for "nodes .
> >   but i am getting date from databases and  as per my requirements
> >  i have to set   diffenent node types   dynamically which i may not be
> > declared in
> > my jsp (predefine(
> >  when i click that node it has to go to some page.
> >  bu
> > t what happen here is i have to declare all node types (pre define) in jsp
> > like this
> >
> > in tree 2 we have to declare all  nodes names in <facet> like this
> > <f:facet name="person">
> >   in java code
> >  TreeNodeBase personNode = new TreeNodeBase("person", "Frank Foo", false);
> >
> >  i want to declare my  facets  also in backing beans with nodestypes   so
> > that my tree will become dynamic
> >
> > is there any solutions
> > please give some rough example .
> >
> > with regards
> > shannu
> > --
> > View this message in context: http://www.nabble.com/tree-2-is-not--a-dynamic-tree-tf1899088.html#a5212173
> > Sent from the MyFaces - Users forum at Nabble.com.
> >
> >
>

Re: tree 2 is not a dynamic tree

Posted by Cosma Colanicchia <co...@gmail.com>.
As Andrew said, you can always use a single node type (only one
facet), and inside of it apply your presentation logic looking at the
node properties.

Cosma


2006/7/7, sarma <ss...@mahindrabt.com>:
>
> Hi,
>   the facet are for "node types", not for "nodes .
>   but i am getting date from databases and  as per my requirements
>  i have to set   diffenent node types   dynamically which i may not be
> declared in
> my jsp (predefine(
>  when i click that node it has to go to some page.
>  bu
> t what happen here is i have to declare all node types (pre define) in jsp
> like this
>
> in tree 2 we have to declare all  nodes names in <facet> like this
> <f:facet name="person">
>   in java code
>  TreeNodeBase personNode = new TreeNodeBase("person", "Frank Foo", false);
>
>  i want to declare my  facets  also in backing beans with nodestypes   so
> that my tree will become dynamic
>
> is there any solutions
> please give some rough example .
>
> with regards
> shannu
> --
> View this message in context: http://www.nabble.com/tree-2-is-not--a-dynamic-tree-tf1899088.html#a5212173
> Sent from the MyFaces - Users forum at Nabble.com.
>
>

Re: tree 2 is not a dynamic tree

Posted by sarma <ss...@mahindrabt.com>.
Hi,
  the facet are for "node types", not for "nodes .
  but i am getting date from databases and  as per my requirements
 i have to set   diffenent node types   dynamically which i may not be
declared in
my jsp (predefine(
 when i click that node it has to go to some page.
 bu
t what happen here is i have to declare all node types (pre define) in jsp
like this

in tree 2 we have to declare all  nodes names in <facet> like this 
<f:facet name="person"> 
  in java code 
 TreeNodeBase personNode = new TreeNodeBase("person", "Frank Foo", false);

 i want to declare my  facets  also in backing beans with nodestypes   so
that my tree will become dynamic 

is there any solutions
please give some rough example .

with regards
shannu
-- 
View this message in context: http://www.nabble.com/tree-2-is-not--a-dynamic-tree-tf1899088.html#a5212173
Sent from the MyFaces - Users forum at Nabble.com.