cancel
Showing results for 
Search instead for 
Did you mean: 

Addition of Node based on some criteria

Former Member
0 Kudos

Hi Experts,

My scenario is to add the details of one table of a tab1 to another table of tab2.

I need to add the details of a Msg_Id of status "High" of the table of tab1 to the table of tab2. I need to check the condition and then add..

Can any one provide me the code..

Thanks & Regards,

Priya

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hai priya,

in tab1 you have table binded to one node A ,in tab2 you have binded another nodeB to Table.

write the Code in action for TabSelect

int size=wdContext.nodeA().Size();
for(int i=0;i<size;i++){
String s=wdContext.nodeA().getAElementAt(i).getAA();
IIPrivateXXView.IBElement ele=wdContext.createBElement();
ele.setBB(s);
wdContext.nodeB().addElement(ele);
}

regards,

naga

Abhinav_Sharma
Contributor
0 Kudos

Hi Priya,

What is tab1 or tab2?is this a tabstrip? Please explain

Abhinav

Former Member
0 Kudos

Try the following

for(int j=0;j< wdContext.nodeTable1().size();j++)

{

String id1= wdContext.nodeTable1().getElementAt(j).getAttributeValue("MsgId");

// The following will check and add the element to Table2 node

if(id1.trim().equals("HIGH))

{

IPrivate<ViewName>.ITable2Element ele=wdContext.createTable2Element();

ele.set<<ATTR1>>(wdContext.nodeTable1().getElementAt(j).get<ATTR1>>());

wdContext.nodeTable2().addElement(ele);

}

}

Regards,Anilkumar

Message was edited by:

Anilkumar Vippagunta