on 04-24-2008 11:34 AM
hi
i have a scenario where i have
declared dropdownbyindex which has several
countries and on select of a particular
country i have to get a dropdown of
city dynamically .
can any one help me out with this issue ?
hi,
U might have created two drop down for country and Cities ,
populate the countries list for the first drop down .
create a context Attribute of type WDVisibility.bind it to the cities drop down, in the doinit method make the attribute to invisible .as
wdContext.currentContextElement.seturContextAttribute(WDVisibility.None) and when the User select the countries list fire the onSelect metho of the dropdown for Countries, get the user selected country and accordingly u populate the second drop down and make Visibility to Visible
wdContext.currentContextElement.seturContextAttribute(WDVisibility.Visible);
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,
In onSelect method of dropdown u can pass the country to a method which is fetching cities for a particular country and populate the dropdown for city
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
where are you getting the data from:
reply assumption: getting statelist from BAPI and is binded and mapped already
You can do it by defining an action for drop down list and put you logic in the same.
Bind this action to onSelect event of drop down list.
Under action get your element on lead selection of your context.
eg
String selected_contry = wdContext.current<CountryList>Element.getCountry();
wdContext.current<StateList>Element().setInput_Country( selected_country);
wdThis.wdGet<Component>Controller().executeBAPIGetStates();
Mandeep Virk
Edited by: Mandeep Virk on Apr 24, 2008 4:34 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What have you tried so far?
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.