cancel
Showing results for 
Search instead for 
Did you mean: 

Loop through table(table is created dynamically)

Former Member
0 Kudos

Hi all,

I have a table that is created dynamically.It has got 3 columns and 8 rows.In first row - first column,I have a value that is set dynamically.Now, How can I loop through this table and get this value?

The table context node and value attributes are also created dynamically.

Table node is "TimesheetData" and value attribute is col1.Value,col1.Value and col3.Value

TimesheetData

-


col1.Value

-


col2.Value

-


col3.Value

Again.... this node and attributes are not there in my view context by default, its getting created and binded dynamically here.

Thanks Kukku

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Following is the code to iterate through the elements


//Table node is "TimesheetData" and value attribute is col1.Value,col1.Value and col3.Value

for(int x=0;x<wdContext.getChildNode("TimesheetData",0).size(); x++)
	  {
		  IWDNodeElement nodeElement = wdContext.nodeTimesheetData().getElementAt(x);
		  String value1 = (String) nodeElement.getAttributeValue("col1");
		  String value2 = (String) nodeElement.getAttributeValue("col2");
		  String value3 = (String) nodeElement.getAttributeValue("col3");
	  }

Regards

Ayyapparaj

Answers (0)