on 09-22-2008 2:34 PM
Hi
From Function modules i have the following structure which i have mapped to my context:
Building(Node)
|_Build
|_Btext
Room(Node)
|_Build
|_RNr
|_Rtext
In my View I have 2 dropdowns - Building and Room. The Room dropdown values are dependant on the Building value.
I am using Dropdown by key. How do I code the second dropdown so that it populates where
Building.Build == Room.Build?
Below is my code for the 2 dropdowns. Your help is much appreciated and points rewarded.
//SRM-BUILD
IWDAttributeInfo ainfoBuild =wdContext.nodeZhr_Rfc_Dataver_Input().nodeOutputGetData().nodeIt_Outtab().getNodeInfo().getAttribute("Btext");
ISimpleTypeModifiable stBuild = ainfoBuild.getModifiableSimpleType();
IModifiableSimpleValueSet vsBuild =stBuild.getSVServices().getModifiableSimpleValueSet();
for(int i=0;i<wdContext.nodeBuild().size();i++){
wdContext.nodeBuild().setLeadSelection(i);
vsBuild.put(wdContext.currentBuildElement().getBuild(),wdContext.currentBuildElement().getStext());
}
if(wdContext.currentBuildElement().getBuild() != null){
IWDAttributeInfo ainfoLocation =wdContext.nodeZhr_Rfc_Dataver_Input().nodeOutputGetData().nodeIt_Outtab().getNodeInfo().getAttribute("Rtext");
ISimpleTypeModifiable stLocation = ainfoLocation.getModifiableSimpleType();
IModifiableSimpleValueSet vsLocation =stLocation.getSVServices().getModifiableSimpleValueSet();
if(wdContext.currentBuildElement().getBuild().equals(wdContext.currentLocationElement().getBuild())){
for(int i=0;i<wdContext.nodeLocation().size();i++){
wdContext.nodeLocation().setLeadSelection(i);
if(wdContext.currentBuildElement().getBuild().equals (wdContext.currentLocationElement().getBuild())){
vsLocation.put(wdContext.currentLocationElement().getLoc(),wdContext.currentLocationElement().getStext());
}
}
}
}
Thanks for all the help.
I will go RFC route(send parameter to RFC and retrieve values based on parameter)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In the First Dropdown(Building) , in the Onselect event you can write the code to populate the second dropdown(Room). The logic here will be to find the Building selected by the user and based on that , enable and populate the second dropdown of Room.
refer the following thread which is similar to your query.
Dependable Dropdown boxes
Thanks
Abhilasha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Its been discussed many times in this forum...
you just need to pass the Building parameter to room Functional module.
wdcontext.roomnode.setroomattribute(wdcontext.buildingNode.getcurrentBuildingParameter());
and populate the drop down with the output of room functional module
PradeeP
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 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.