Skip to Content
avatar image
Former Member

Addition of Node based on some criteria

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Mar 21, 2007 at 09:12 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 21, 2007 at 09:12 AM

    Hi Priya,

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

    Abhinav

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 21, 2007 at 09:20 AM

    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

    Add comment
    10|10000 characters needed characters exceeded