
An InputField UI element is displayed as a combo box if the relevant context attribute has a proposal list. A combo box is a combination of a drop down list and an input field. This allows users to type a value directly into the control and to pick from a list of existing options.
In Web Dynpro, you get a combo box by assigning a proposal list (interface com.sap.typeservices.IProposalList ) to the context attribute that the value property of an InputField is bound to.
The screenshot below shows a combo box.
You have created a Web Dynpro Project including component, window and application.
IProposalList proposalsCity = wdContext.nodeMyNode().getNodeInfo().getAttribute(IPrivateMyView.IMyNodeElement.CITY).getModifiableSimpleType().getSVServices().getProposals();
proposalsCity.add("New York");
proposalsCity.add("Rio");
proposalsCity.add("Paris");
proposalsCity.add("Bangalore");
proposalsCity.add("Palo Alto");You can easily reset the proposal list using this code:
proposalsCity.reset();