Re: Struts approach to JSP's
[email protected] Sat, 16 Nov 2002 04:40:35 +0000 (UTC)
| Newsgroups | gmane.comp.web.mvc.devel |
|---|---|
| Organization | Basebeans.com |
| Message-ID | <[email protected]> |
>>>>> "Uday" == Uday Kotla <[email protected]> writes:To: [email protected] 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.To: [email protected] First of all, questions specific to Struts should probably go to the"struts-user" list.To: [email protected] I'll answer the easy question :) .To: [email protected] 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 theitems that go into the list, and the former specifies both the currentlyselected items from the list, and the request parameter that will be sent withthe currently specified items.To: [email protected] 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.To: [email protected] -- ===================================================================David M. Karr ; Java/J2EE/XML/Unix/[email protected] ; SCJPTo: [email protected] _______________________________________________ MVC-Programmers mailing list [email protected] http://www.netbean.net/mailman/listinfo/mvc-programmers To unsubscribe from this group, send an email to: [email protected] Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/