struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rene Gielen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4088) Supressing empty parameters on <s:a> tag
Date Sun, 05 Jan 2014 17:03:57 GMT

    [ https://issues.apache.org/jira/browse/WW-4088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13862600#comment-13862600
] 

Rene Gielen commented on WW-4088:
---------------------------------

Greg, thanks for the patch. I haven't yet reviewed it, but I have another question: mid November
I reached out to you on behalf of the Struts PMC via the email address provided in your JIRA
user profile. Since we did not hear back from you, I am afraid our mail did not reach you.
Could you please contact me? rgielen at apache dot org.
Thanks in advance

> Supressing empty parameters on <s:a> tag 
> -----------------------------------------
>
>                 Key: WW-4088
>                 URL: https://issues.apache.org/jira/browse/WW-4088
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Plugin - Java Templates, Plugin - Tags
>    Affects Versions: 2.3.14.2
>         Environment: Tomcat/Centos
>            Reporter: Greg Huber
>            Assignee: Lukasz Lenart
>            Priority: Minor
>             Fix For: 2.3.16
>
>         Attachments: paramtag_patch.txt, patch.txt, patch.txt
>
>
> Hello,
> When using the s:a anchor tag you can get parameters with empty values ie ?foo= for null
values. 
> It would be good if there was a way to filter these out, similar to the struts.xml <param
name="suppressEmptyParameters">true</param>. The <s:if> tags in the body are
ignored.  I either have to do it in programatically or use jstl :(
> ie possibly do something similar :
> from:
> {code:xml}
> <s:a action="eventAdd" accesskey="a">
> <s:text name="title.heading.eventadd" />
> <c:if test="${not empty bean.searchString}">
>  <s:param name="bean.searchString" value="%{bean.searchString}" />
> </c:if>
> <c:if test="${not empty bean.filter}">
>  <s:param name="bean.filter" value="%{bean.filter}" />
> </c:if>
> <s:param name="bean.pageNum" value="%{pager.pageNumber}" />
> </s:a>
> {code}
> To:
> {code:xml}
> <s:a action="eventAdd" accesskey="a">
> <s:text name="title.heading.eventadd" />
> <s:param name="bean.searchString" value="%{bean.searchString}" />
> <s:param name="bean.filter" value="%{bean.filter}" />
> <s:param name="bean.pageNum" value="%{pager.pageNumber}" />
> <s:param name="suppressEmptyParameters" value="true"/>
> </s:a>
> {code}
> (Ref WW-3920)
> Cheers Greg



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message