cancel
Showing results for 
Search instead for 
Did you mean: 

Generate forms dynamically according to table records....

Former Member
0 Kudos

Hi,

I am doing one application . This application contains 2 views. First view contain one table and second view contains no of forms which depend on no of records in table. ex. if table having 5 records then 5 forms will display on second view how i solve this problem ..please explain in brief...

Regards,

gurprit Bhatia

Edited by: GURPRIT BHATIA on Feb 20, 2008 10:59 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

"if table having 5 records then 5 forms will display on second view how i solve this problem "

make use of row repeater UI for this purpose.

Regards

Ayyapparaj

Former Member
0 Kudos

Hi Ayyapparaj,

what is row repeater UI ? Please explain briefly . Beacause i am not able to find out such kind of ui element .

Regards,

Gurprit Bhatia

Former Member
0 Kudos

Hi,

I think its not available in your version,

You can try as follows

loop through the elements create ui elements and context attributes

bind them to the Ui elements



for(int x=0; x<wdContext.nodeT().size(); x++)
	  {
		  IWDTransparentContainer transparentContainer = (IWDTransparentContainer)view.getElement("<Your Container>");
		   // Add labels if needed
		  IWDInputField inputField = (IWDInputField) view.createElement(IWDInputField.class);
		  IWDNodeInfo nodeInfo = wdContext.getNodeInfo();
		  //create a unique name and specify the datatype
		  IWDAttributeInfo = nodeInfo.addAttribute(name, dataType);
		  inputField.bindValue(attributeInfo);
		  //finally add it to the container
		  transparentContainer.addChild(inputField);
		  
	  }

Regards

Ayyapparaj

Answers (1)

Answers (1)

Former Member
0 Kudos

wdocontext.node<name>.size();

After Getting the size try to create a dynamic UI elements based on the number of records in the first view.