on 04-08-2008 1:52 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.