cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic input creating

Former Member
0 Kudos

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 ?

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member201361
Active Contributor
0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

What have you tried so far?

Armin