on 04-09-2008 9:59 AM
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 ?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, it's possible. Please search this forum for "dynamic", "programming", "wdDoModifyView" etc.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.