I think if you look at it you really don't want it to be a business method. There is nothing business particular about it. It's not like you can fetch specific data. You get back a TreeNode which may or may not be the data in question. It may only be part of it, or can be none of it at all. Maybe you want to say fetchTreeA, fetchTreeB, or load data from a db. But you should hide that behind the getChildren method of TreeNode.
 
Then you can just return a TreeNode for the value binding method with a hidden root and depending on the Tree selected by the user getChildren returns treeA or treeB or data from the database if there is any. It's particularly useful to do it this way so you don't load data from the database you aren't displaying.
 
 
----- Original Message -----
Sent: Friday, April 15, 2005 7:59 AM
Subject: RE: Calling method for getting tree2 data

See if I simply write Cabinet.treeData, then I think its being treated as Bean�s property. I don�t want to have it.

 

I wanted to treat this method as a business method.

 

Thanks

Mihir

 

-----Original Message-----
From: Rob Decker [mailto:[EMAIL PROTECTED]
Sent: Friday, April 15, 2005 5:21 PM
To: MyFaces Discussion; [EMAIL PROTECTED]
Subject: Re: Calling method for getting tree2 data

 

The tree2 value  expects a TreeNode object returned by the value binding. If you mean call, the method is CabinetTree.fetchTreeData not cabinetTree.getFectchTreeData probably not as you have to live with bean limitations specification. Why can't you just call it getTreeData? Then you can call CabinetTree.fetchTreeData from that method.

----- Original Message -----

Sent: Friday, April 15, 2005 5:06 AM

Subject: Calling method for getting tree2 data

 

Hi,

 

I would like to know whether I can call a method (NOT PROPERTY) of a bean to get the data for the tree2 node.

 

If yes then could anyone guide me how?

 

<x:tree2 value="#{CabinetTree.fetchTreeData}" id="cabinet-tree"

var="node" varNodeToggler="t" clientSideToggle="false">

 

            :

            :

            :

</x:tree2>

 

In the above �fetchTreeData� is a method which gets data from the DB and returns it.

 

By doing this I am getting some Invalid _expression_ error. So, is there any other way to do so?

 

Mihir


Patni Computer Systems Ltd.

Tel : 91 79 23240905 Ext : 413

 


http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_____________________________________________________________________

This e-mail message may contain proprietary, confidential or legally privileged information for the sole use of the person or entity to whom this message was originally addressed. Any review, e-transmission dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error kindly delete this e-mail from your records. If it appears that this mail has been forwarded to you without proper authority, please notify us immediately at [EMAIL PROTECTED] and delete this mail.
_____________________________________________________________________


http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_____________________________________________________________________

This e-mail message may contain proprietary, confidential or legally privileged information for the sole use of the person or entity to whom this message was originally addressed. Any review, e-transmission dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error kindly delete this e-mail from your records. If it appears that this mail has been forwarded to you without proper authority, please notify us immediately at [EMAIL PROTECTED] and delete this mail.
_____________________________________________________________________

Reply via email to