on 08-20-2007 11:36 AM
Hi,
How to create an UI element dynamically on action of selecting a value from the drop down?
help out with the steps i need to follow..
Hi,
1. first insert the DropdownByIndex UI element
2.create a one action
2. go to the DropdownByIndex Properties Event-->onSelect assign the corresponding action
these are steps for creating the dynamic actions
Regards,
P.Manivannan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
<u><i><b>Dynamic UI Element creation</b></i></u>
We can create it only in the WD Modify View.
Get the instance for the Root UI Element Container.
Create the UI element Ex: Input Field, Text View etc.
Bind the UI Element to the Attribute Value.
Now bind the UI Element to the Root UI Element Container.
{
IWDTransparentContainer root =(IWDTransparentContainer)view.getRootElement();
IWDDropdownByIndex DdbName = (IWDDropdownByIndex)view.createElement(IWDDropdownByIndex.class,"DdbName");
IWDDropdownByIndex DdbAge = (IWDDropdownByIndex)view.createElement(IWDDropdownByIndex.class,"DdbAge");
IWDDropdownByIndex DdbGender = (IWDDropdownByIndex)view.createElement(IWDDropdownByIndex.class,"DdbGender");
IWDNode Mad =wdContext.getChildNode("Person",0);
IWDAttributeInfo NameAtt = Mad.getNodeInfo().getAttribute("Name");
IWDAttributeInfo AgeAtt = Mad.getNodeInfo().getAttribute("Age");
IWDAttributeInfo GenderAtt = Mad.getNodeInfo().getAttribute("Gender");
DdbName.bindValue(NameAtt);
DdbAge.bindValue(AgeAtt);
DdbGender.bindValue(GenderAtt);
root.addChild(DdbName);
root.addChild(DdbAge);
root.addChild(DdbGender);
}
<u><i><b>Dynamic Action Creation</b></i></u>
Create the Action in the Action tab.
Create a Button.
Get the reference for the created action (Through the Event Handler).
Bind the Action to the Button.
Bind the Button to the Root UI element Container.
IWDButton ButGo = (IWDButton)view.createElement(IWDButton.class,"ButGo");
IWDAction ActGo = wdThis.wdCreateAction(IPrivateStartView.WDActionEventHandler.GO,"Click");
ButGo.setOnAction(ActGo);
root.addChild(ButGo);
Now write the required code for the Event Handler that is associated with the Action.
//@@begin onActionGo(ServerEvent)
IWDNode Mad = wdContext.getChildNode("Person",0);
wdComponentAPI.getMessageManager().reportSuccess(Mad.getCurrentElement().getAttributeAsText("Name"));
wdComponentAPI.getMessageManager().reportSuccess(Mad.getCurrentElement().getAttributeAsText("Age"));
wdComponentAPI.getMessageManager().reportSuccess(Mad.getCurrentElement().getAttributeAsText("Gender"));
//@@end
Regards
SURYA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suresh..
check this..
Hope this will help..
Urs GS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.