myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Surrey Hughes" <SHug...@dws.com.au>
Subject RE: accessing parent nodes in tree2
Date Tue, 26 Jul 2005 00:05:13 GMT

Hi,
Truth be told the first thing I did was create my own tree node implementing the TreeNode
interface.  I did this so I could:
 - Add a boolean isValidChild(TreeNode child){} method to enforce business rules regarding
the addition of child nodes.
 - Add a boolean addChild(TreeNode child) {} method to add children and so I could also add
a parent to the child if I wanted to (as I can foresee the need to do that).
 - Made the setChildren() inaccessible so you have to use the addChild method (enforce validation).

It's probably the best option.

-----Original Message-----
From: Dennis_Byrne@ak.blm.gov [mailto:Dennis_Byrne@ak.blm.gov]
Sent: Tue 26/07/2005 8:59 AM
To: users@myfaces.apache.org
Subject: accessing parent nodes in tree2
 
I'm using #{node.identifier} inside a lot inside of f:param elements .  On 
one page, I need to access #{node.parent.identifier} .

Does anyone have any bright ideas before I subclass TreeNodeBase, add a 
'parent' property and start setting this manually in my backer?

Dennis Byrne




Mime
View raw message