on 06-26-2007 4:17 PM
Hi Experts,
I have a node which is bound to a table ui element.
ParentNode
-
item
-
flag
But I want only those elements to be displayed which have flag true.
Right now all the elements in the node are displayed.
How do I achieve this?
Thanks
HI,
If u want to use only one node, then after adding the elements to that node, u can delete the elements which is having the values false as follows
for(int i=0;i<Parentnode.size();i++)
{
parEl=Parentnode.getParentElementAt(i);
if(parEl.getFlag()==false)
{
Parentnode.removeElement(parEl);
}
}
Regards
Fahad Hamsa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Create another node with same structure.
Bind the table to to the above created node.
In the Init() method ..populate the new node.
for(int i=0;i<PartneNode.size;i++)
{
if(flag==true)
{
Create an element of new node and set the values
}
}
Thanks,Anil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The first time, I display the node values, value for flag for all the items is true.
The problem is that once I display the node values on the page, the user has the ability to change the flag value to false (by pressing delete button). So, then I dont want to display this item in the table.
But I cannot do a removeelement on the node here, as I need this element's value at the end while saving the data in the bapi which is done once the user does all adds and removes of items.
Can you please help.
Thanks
Hi,
There is no way to fulfill your requirement with single node. You have to use two nodes. Also you have to keep track on which element you have deleted.
Create one more node with same elements.
If you want to copy all values from one node to another then use given below method:
WDCopyService.copyElements(<source node>,<target node>);
Regards,
Bhavik
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.