Hm, obviously this solution won't work for clean URLs. Any ideas how I
could solve the same problem with URLs like

/myroot/mail/inbox/123

?

Thanks!

Pascal schrieb:
> Didn't think of that. Works well, thanks!
> 
> Instead of value="${param[p.key]}" you can also just use
> value="${p.value}", by the way.
> 
> Aaron Porter schrieb:
>> Hi Pascal,
>> You could do something like this:
>>
>> <s:link beanclass="${actionBean.class}"><c:forEach var="p" 
>> items="${param}"><s:param name="${p.key}" 
>> value="${param[p.key]}"/></c:forEach>View as HTML</s:link>
>>
>> Aaron
>>
>> On 05/07/2010 02:31 PM, Pascal wrote:
>>> Hi,
>>>
>>> I have a page, say
>>>
>>> /myroot/ShowMail.action?id=123&dir=inbox
>>>
>>> and I need some links which add parameters to the (current) page, e.g.
>>>
>>> <a href="/myroot/ShowMail.action?id=123&dir=inbox&view=HTML">View as
>>> HTML</a>
>>> ("/myroot/ShowMail.action?id=123&dir=inbox" being the current page
>>> accessed by the user)
>>>
>>> However, there might be more parameters (showHeaders=true, etc.) so I
>>> cannot easily use<s:link>  with<s:param>-subtags (would be like 10
>>> <s:param>  tags for each link on the page).
>>>
>>> What I tried was something along
>>>
>>> <s:link href="${actionBean.context.request.pageURI}?${...query}">
>>>
>>> However, as I have an ActionBean for each JSP, in the JSPs these values
>>> always evaluate to the JSP request (i.e. request.pageURI ==
>>> ".../showMail.jsp") which is not really usable to build a link for the
>>> user to click.
>>>
>>> Is there an easy way (except adding every possible<s:param>-tag to each
>>> <s:link>  on the page) or did someone maybe had a similar problem?
>>>
>>> Thanks!
>>>
> 


------------------------------------------------------------------------------

_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to