cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically creating Ui elements

Former Member
0 Kudos

i need coding for creating Text Edit ,Inputfield,radioButtons,

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

some what ........i got thank u every one ...

thank's a lot

nikhil_bose
Active Contributor
0 Kudos

For creation:


IWD<ClassName> <object> = (IWD<ClassName>) view.createElement( IWD<ClassName>.class, "unique_id");

Access existing UI Element


IWD<ClassName> <object> = (IWD<ClassName>) view.getElement(  "unique_id");

you can get/create context attributes with the help of Attributeinfo.


IWDAttribureInfo myinfo = wdContext.node<NodeName>().getNodeInfo().getAttribute("attribute_id");

hope this will help.

nikhiL

Former Member
0 Kudos

Hi,

 

IWDTransparentContainer root = (IWDTransparentContainer)view.getRootElement();//Access to root container
	  IWDTextEdit titleTextView = (IWDTextEdit)view.createElement(IWDTextEdit.class, "Title_Text"); 
	  titleTextView.setVariousAttributes();
                  .
	  .
	  root.addChild(titleTextView);
	  IWDInputField inp = (IWDInputField)view.createElement(IWDInputField.class,"Inpfield" );
	  inp.setVariousAttributes();
	  .
	  .
	  .
	  root.addChild(inp);
	  
	  IWDRadioButton rbtn = (IWDRadioButton)view.createElement(IWDRadioButton.class,"rbtn" );
	  rbtn.setVariousAttributes();
	  .
	  .
	  .
	  .
	  root.addChild(rbtn);

regards

Surender Dahiya

Former Member
0 Kudos

Hi,

Following is a sample


	  IWDTransparentContainer container = (IWDTransparentContainer)view.getElement("RootElement");
	  IWDAttributeInfo attributeInfo = wdContext.getNodeInfo().getAttribute("Description");
	  IWDTextEdit textEdit = (IWDTextEdit)view.createElement(IWDTextEdit.class);
	  textEdit.bindValue(attributeInfo);
	  textEdit.setCols(20);
	  textEdit.setRows(3);
	  container.addChild(textEdit);
	  //Hope the following code will help you to understand how to create further
	  IWDButton button = (IWDButton)view.createElement(IWDButton.class);
	  container.addChild(button);

Regards

Ayyapparaj