>>>>> "Uday" == Uday Kotla <[EMAIL PROTECTED]> writes:
Uday> Hi All, Uday> Context: Adding/Editing Records using same jsp, and going through a controller Uday> When user clicks "Add Employee" button on a page, need to display employee.jsp to the user with the department dropdown list pre-populated. Was wondering what about be a good approach. Also, would like to use the same jsp for editing an employee. User would click a href link with employee name, which can pass a query parameter (employee id). Was planning on writing a RetrieveEmployeeAction class. But, need to discuss various options avialable for dealing these situations. First of all, questions specific to Struts should probably go to the "struts-user" list. I'll answer the easy question :) . Pre-populating a dropdown is done with the "html:select" and "html:options" tags, where the latter is in the body of the former. The latter specifies the items that go into the list, and the former specifies both the currently selected items from the list, and the request parameter that will be sent with the currently specified items. If you want simple examples of this, inspect the "struts-exercise-taglib" application, which is part of the Struts distribution. The "html-select.jsp" page shows several examples of these tags in action. -- =================================================================== David M. Karr ; Java/J2EE/XML/Unix/C++ [EMAIL PROTECTED] ; SCJP _______________________________________________ MVC-Programmers mailing list [EMAIL PROTECTED] http://www.netbean.net/mailman/listinfo/mvc-programmers