cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic programmic

Former Member
0 Kudos

hi

i am doing a scenario where i have declared a

TabStrip container with 3 tabs , now i need

to add one input field to the one of the Tab dynamically

is this is possible ? can any one help me out ?

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Murali

suppose tab1 is the desired tab

1. Get the access to the tab1.

IWDTab tab1 = (IWDTab)view.getElement("TabID");

2.Now create the input field dynamically.

IWDInputField inp=view.createElement(IWDInputField.class);

3.Now add the input field to the tab1.

tab1.getContent().getContainer().addChild(inp);

U need to write this code in wdDoModifyView.

regards

Surender Dahiya

former_member201361
Active Contributor
0 Kudos

hi,

first get the transparent container in the wdDomodify ();

in the domodify():

IWDTransparentContainer container = view.createElement(IWDTransparentContainer.class);

IWDInputField input = view.createElement(IWDInputField.class);

then add the input field to the transparent container.

container.addChild(input);

thanks and regards

fistae

Former Member
0 Kudos

Hi Murali,

The solution to your prob

In the wdDoModify method you have to write the following code.

1.First get the transparent container container and

2. then create an input field and

3. add it to container

IWDTransparentContainer container = (IWDTransparentContainer)view.getElement("Tab1_content1");

IWDInputField IfNew1 = (IWDInputField)view.createElement(IWDInputField.class, "IfNew1");

container.addChild(IfNew1);

xxxxxxxxxxxxxxxxxxxx

Regards.

Naresh Garg.

Edited by: Armin Reichert on Apr 26, 2008 6:51 PM

Former Member
0 Kudos

Hi,

Why not do it at design time?

Following is the code to start with



	  //Tabstrip 
	  IWDTabStrip tabStrip = view.createElement(IWDTabStrip.class);
	  //Tab
	  IWDTab tab = view.createElement(IWDTab.class);
	  //Input Field
	  IWDInputField inputField = view.createElement(IWDInputField.class);
                 // map the input field with the attribute

Regards

Ayyapparaj

Former Member
0 Kudos

Yes, it's possible. Please search this forum for "dynamic", "programming", "wdDoModifyView" etc.

Armin