on 03-17-2008 5:05 PM
I have a node that is called many times. This node contains other nodes and elements.
Node1
-- elem1
-- elem2
-- node2
------elem1
-- node3
------elem1
------elem2
I have situations where I want to "empty" it all. -note my code is looking at times at node2 directy and node3 directly for size or "isEmpty".
I called the invalidate method for Node1. If I were to look at node3 with an "isEmpty" will it be empty? Will the size be 0?
Should I rather removeElement for node1, node2 and node3?
Diane
Edited by: Diane Fuller on Mar 17, 2008 6:06 PM
Yes Diane,Invalidate should remove any element association with a node and its children and you could use isempty to test that.
Ashok
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
Both of them are used in relation to nodes.
The invalidate method is used to invalidate a node.It returns void.
The isEmpty method is used to check whether the node is empty or not. It returns bolean value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Invalidate:This methode will invalidate the node.
The node can be filled by binding elements to it.Its content can be invalidated.
isEmpty():Returns whether the element list is empty.
This will return the boolean value.
If mandatory is false, the node is initially empty. Then all UI elements bound to
this node are empty and read only. If mandatory is true, the node non-empty upon access.
This is very convenient for value nodes.
Regards,
Lavanya.G
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.