on 09-14-2006 10:24 AM
Hi,
I have a req that I should display Dynamic Drop Down Box for a single input field on th output. I have 3 Car names are there in the selection. If I select one of the selections then it should again displayed as a Drop Down
in which 2 names(price,color) are displyed.
I completed First part, while selecting the car names Iam unable to get Drop Down(2 names) for the seleted car names.
Hi,
try this,
Create one static node name like 'NodeA'
Create one Node using the following code. Inside the DoInit() method
Private<ViewName>.INodeAElement ele = wdContext.createNodeAElement();
wdContext.nodeNodeA().addElement(ele);
IWDNodeInfo multipleinfo = wdContext.nodeNodeA().getNodeInfo();
IWDNodeInfo multiplenode = multipleinfo.addChild("MultiNode" , null, true, false, true, true, false, true, null, null, null);
multiplenode.addAttribute("roles", "ddic:com.sap.dictionary.string");
Step 2:
Assign values for Dropdown
IWDNode node1 = wdContext.nodeNodeA().getChildNode("MultiNode", IWDNode.NO_SELECTION);
IWDNodeElement elem1;
//determine the number of entries in dropdown say size
for(int s=0;s<size;s++){
elem1 = node1.createElement();
elem1.setAttributeValue("roles",assign the values you want to list);
node1.addElement(elem1);
}
Step 3:
Inside Domodifyview create IWDDropDownByIndex UI Element and Bind it.
IWDDropDownByIndex dropDownList = (IWDDropDownByIndex)view.createElement(IWDDropDownByIndex.class, "drop");
IWDAttributeInfo info = wdContext.getNodeInfo().getChild("NodeA").getChild("MultiNode").getAttribute("roles");
dropDownList.bindTexts(info);
Regards,
Saravanan K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Import the project and see the complete code for Dynamic UI elements:
Regards, Suresh KB
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
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.