On Thu, 03 Mar 2005 12:11:05 -0600, Tim Pyle <[EMAIL PROTECTED]> wrote:
> Well, to be honest, I do not think I am wanting to change the tree as
> much as I am wanting to change the Treenode data that the tree takes.
> The tree takes a value from a backing bean that returns a TreeNode
> Object. Guess I am trying to figure out a way for a jsp developer to
> dynamically change the way that this TreeNode is built without having to
> access the bean itself and hardcoding the specifics. As you know, I am
> using the tree2 component to display the directory structure of the log
> files on my appserver. However, this directory path is hardcoded into
> the bean during the Treenode creation. I would like to be able to pass
> this starting directory into the tree, so that it can be read in before
> the treeNode is actually built. So to recap, the tree itself is great,
> works like a champ, I am just trying to figure a way to pass in
> parameters, via jsp, into the method that builds the TreeNode.

OK.  Now I understand what you want (I think).  You are talking about
a "prefix" that you can append to each node.  How woud you use the
prefix?  Would you be prefixing the node description or what?
 
One idea that wouldn't require any changes to the tree code would be
for you to subclass TreeNodeBase.  You could pass in your own
parameter there and have getDescription prepend your prefix.  Or you
could have a brand new getter ethod to return what you need.  Remember
that the tree is pretty flexible about what goes in it.  You can do
all sorts of things with the value binding expressions in your JSP
code beyond what is shown in the example.

Does that help?

> Tim

sean

Reply via email to