Implementing custom dropdown values in a JSP

Implementing custom dropdown values in a JSP

Well my problem is trivial but I am not able to decide on exact implementation, as I am new to using JCo.

Well I have a JSP page that has radio buttons. User selects one of them and the page should automatically reload with an extra table below the radio buttons.

This new table is obtained after I perform a backend connection with JCo and retrieve some data values and display them on JSP page.

My problem is how should I implement the process of retrieving the data values and placing them as dropdown menu in table 2 on the same JSP page.

Thanks, John

    Requires Free Membership to View

    When you register, you will start receiving targeted emails from my award-winning team of editorial writers. Our goal is to keep you informed on the hottest topics and biggest challenges faced by SAP professionals today.

    Hannah Smalltree, Editorial Director

    By submitting your registration information to SearchSAP.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchSAP.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

Building a helpful Web page with dynamic information from SAP often requires you to provide preselected values, such as that from a dropdown list. Depending on the user interface framework you are using to build your application, you would likely encapsulate this help functionality within an external Java class. The classic example is that of the MVC pattern as implemented by the Apache Struts framework (http://jakarta.apache.org). In this framework, you would build an Action class that provides the specific SAP RFC call required to populate the dropdown. When the user initiates a selection in the JSP that changes the dropdown, the JSP would call the Struts ActionServlet to transparently execute the Action class that contains the logic to call SAP. My book, "Enterprise Java for SAP," contains specific examples of how to use the Struts framework in conjunction with SAP JCo.

This was first published in August 2004