on 09-05-2007 1:03 PM
Hi experts ,
Consider the folowing scenario:
1) I have some data in a node , the node has one child node( Singleton false , cardinality 0..n) and that child node has one more child node ( Singleton false , cardinality 0..n) , lets call this "datanode'
2) there is an input table where user enters the search criteria , i have bound this to one context with similar structure , lets call this "searchinputnode".
3) Now depending on user's input i have to loop through the datanode and get the corresponding data into another node , lets call this "outputnode".
Now my question is , how do i loop on the datanode with the search fields of the searchnode and store the result in resultnode ?
An example code would be useful.
I am open for some different suggestions also.
Appriciate your help on this.
Regards,
Ashish Shah
HI,
To Loop over the node
for(int i=0; i<node<name of the name>().size())
{
}
here <name of the node> is the node on which you want to loop at.
<b>To add data to the node:</b>
IPrivate<viewname>.I<nodename>Element ele = wdContext.node<nodename>.create<nodename>Element();
ele.set<attributename>(<attrtibutevalue>);
wdContext.node<nodename>().addElement(ele);
This is how you can add elements to your output node.
<b>To get element from the node</b>
for(int i=0; i<node<name of the name>().size())
{
wdContext.node<nodename>().get<nodename>ElementAt(i).get<attributeName>();
}
Regards,
Murtuza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Why dont you use table filters for searching on table?
Ashu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.