Est-il possible de créer un lien avec le taglib <html:link> avec plusieurs paramètres?
Avec un paramètre je sais faire
mais j'en ai besoin de deux!Code:
1
2 <html:link action="/login.do" paramId="nom" paramName="user" paramProperty="nom">
Version imprimable
Est-il possible de créer un lien avec le taglib <html:link> avec plusieurs paramètres?
Avec un paramètre je sais faire
mais j'en ai besoin de deux!Code:
1
2 <html:link action="/login.do" paramId="nom" paramName="user" paramProperty="nom">
ben sinon tu le fais en html normal ton lien ... tout simplement
sinon j'ai trouvé ça
[FONT=Verdana,Arial,Helvetica][/FONT]Citation:
If you want to add multipe params in the html:link, you have to save these params into a Map object. The Map's key are paramid and Map's value is paramProperty. And then you can do : <html:link page="ViewDept" name="xxx"/> with xxx is The name of a JSP bean that contains a Map representing the query parameters. You can see in Struts HTML tags for detail. Hope that can solve your problem. good luck, NVT
[FONT=Verdana,Arial,Helvetica]Code:
1
2
3
4
5
6
7
8
9
10
11 <bean:parameter id="param1" name="param1" value="0"/> <% java.util.HashMap params = new java.util.HashMap(); params.put("param1", param1); params.put("param2","param2Value"); pageContext.setAttribute("paramsName", params); %> <html:link page="/show.do" name="paramsName" scope="page" >show.jsp</html:link>
sur http://www.jguru.com/faq/view.jsp?EID=877089
(je te laisse lire ça vaut mieux ... bonne chance ;))
[/FONT]
Merci ça marche