cancel
Showing results for 
Search instead for 
Did you mean: 

Simple TableUIElement

Former Member
0 Kudos

Hi,

Can any body please help me to Iterate through the context element.

In my project on clicking on a button it should create a context node and 5 elt and it will display in table as editable textfields.

and on clicking on save button those values should be saved in Database.

I am able to create context node but unable to iterate through the context to save the table details in DB.

Only i am save Selected row values in DB.

Can any body please help me.

Thanks and Regards,

Shashikiran.B

Accepted Solutions (0)

Answers (2)

Answers (2)

nikhil_bose
Active Contributor
0 Kudos


int size = wdContext.node<your_node>().size(); // to get the number of elements
String value1 ;

for (int i = 0; i<size; i++) {

  value1 = wdContext.node<your_node>().getElementAt(i).getValue(); // value is context attribute
// get all 5 values 

// code to insert to DB

}

nikhiL

Former Member
0 Kudos

Hi,

For database related coding pl go through this link

Regards

Ayyapparaj

sridhar_k2
Active Contributor
0 Kudos

Assume your table have input fields for change data.

To get all the records from table

for(int i=0;i<wdContext.nodeTestNode().size();i++){

wdComponentAPI.getMessageManager().reportSuccess("AA : "+wdContext.nodeTestNode().getTestNodeElementAt(i).getTest1());

}

//

To get the seleted lead value....

wdComponentAPI.getMessageManager().reportSuccess("AA : "+wdContext.nodeTestNode().getLeadSelection());

wdComponentAPI.getMessageManager().reportSuccess("AA : "+wdContext.nodeTestNode().getTestNodeElementAt(wdContext.nodeTestNode().getLeadSelection()).getTest1());

Send to DB depend on your requirement.

Regards,

Sridhar