Dear Wiki user, You have subscribed to a wiki page or wiki category on "Struts Wiki" for change notification.
The following page has been changed by MichaelJouravlev: http://wiki.apache.org/struts/StrutsWidgets ------------------------------------------------------------------------------ + == HTML Link == + + Use <html:select> tag to create HTML A element. + + To specify more than one query parameters you need to create a Map, where map key corresponds to request parameter key, and map value corresponds to request parameter value. + + You can specify parameter map with scriptlet like this: + + {{{<% + HashMap params = new HashMap(); + params.put("param1", param1Value); + params.put("param2","param2Value"); + pageContext.setAttribute("linkParams", params); + %> + <html:link page="/myAction.do" name="linkParams" scope="page" >Click Me</html:link>}}} + + Instead of using Struts <html:link> tag you can try JSTL to build link's URL: + + {{{<c:url value="/myAction.do" var="url"> + <c:param name="param1" value="${user.fullName}"/> + <c:param name="param2" value="${'parameter 2'}"/> + </c:url>}}} + == Dropdown box == Use <html:select> tag to create HTML SELECT element that can be rendered either as dropdown box or a listbox. To create a dropdown box set ''size'' less than 2 or do not specify ''size'' at all. @@ -147, +170 @@ == References == - For more elaborate explanation see [http://javaboutique.internet.com/tutorials/strutsform/index.html Advanced Forms Handling in Struts 1.1] + [http://javaboutique.internet.com/tutorials/strutsform/index.html Advanced Forms Handling in Struts 1.1] + [http://www.jguru.com/faq/view.jsp?EID=877089 jGuru Q&A] +