Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.3.14.2
-
None
-
Tomcat/Centos
Description
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:
<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>
To:
<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>
(Ref WW-3920)
Cheers Greg
Attachments
Attachments
Issue Links
- breaks
-
WW-4275 Cast exception on Supressing empty parameters on <s:a> tag
- Closed