Now, thinking about this, I do see some sense in a separate isLeaf()
method, that has to uphold the invariant (getChildren().size() == 0)
== isLeaf(), where we promise that tree2 will call getChildren() only
when we actually need the children to render them (or process them in
the next
ist size can be expensive.
- Brendan
-Original Message-
From: ir. ing. Jan Dockx [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 25, 2005 6:26 PM
To: Dennis Byrne (JIRA); MyFaces Discussion; sean schofield (JIRA)
Subject: Re: [jira] Commented: (MYFACES-447) tree2 TreeNode interface has too
On 26 Aug 2005, at 1:54, [EMAIL PROTECTED] wrote:
x-tad-smaller> The first suggested patch doesn't influence anybody/x-tad-smaller
x-tad-smallerYour words, in JIRA:/x-tad-smaller
x-tad-smallerThe TreeNode interface is the hook for the backing bean developer, the user, into the tree2
1) Removing methods from a super interface doesn't keep you
from adding
similar methods to subclasses
Are you saying people using the methods you want to remove in
TreeNode would have to then subclass it?
implementation); in the supplied patch, the methods are
still in the
class
On 28 Aug 2005, at 20:00, Dennis Byrne wrote:
1) Removing methods from a super interface doesn't keep you
from adding
similar methods to subclasses
Are you saying people using the methods you want to remove in
TreeNode would have to then subclass it?
TreeNode is, and always has been, an
TreeNode is, and always has been, an interface. So, of
course, yes.
So the patch does affect users?
As I said, anyTreeNode has static type TreeNode. Calling a
method that
is removed from the interface on a variable with static type
TreeNode
obviously would be a problem, but as far as I can
Title: Message
There
actuallyare subtle differences among isLeaf(), getChildren.size(), and
getChildCount() that are useful:
1.
When doing "on-demand" population of the tree, isLeaf() can be false even though
there are no children loaded yet (i.e., getChildCount() ==
0).
2. I
believe
Now we are on the list, and we can discuss this ;-).
The first suggested patch doesn't influence anybody, actually, since the methods that are removed from the interface are not used by any tree2 code. And TreeNodeBase keeps behaving as it did before (actually, for it should better be changed
The first suggested patch doesn't influence anybody
Your words, in JIRA:
The TreeNode interface is the hook for the backing
bean developer, the user, into the tree2 framework.
If the TreeNode interface is the hook for the backing
bean developer, and the first patch changes the TreeNode
9 matches
Mail list logo