Revision: 1018
http://stripes.svn.sourceforge.net/stripes/?rev=1018&view=rev
Author: bengunter
Date: 2008-12-23 16:01:51 +0000 (Tue, 23 Dec 2008)
Log Message:
-----------
Applied fix for STS-596 and STS-626 from trunk.
Modified Paths:
--------------
branches/1.5.x/stripes/src/net/sourceforge/stripes/tag/LinkTagSupport.java
Modified:
branches/1.5.x/stripes/src/net/sourceforge/stripes/tag/LinkTagSupport.java
===================================================================
--- branches/1.5.x/stripes/src/net/sourceforge/stripes/tag/LinkTagSupport.java
2008-12-23 16:00:53 UTC (rev 1017)
+++ branches/1.5.x/stripes/src/net/sourceforge/stripes/tag/LinkTagSupport.java
2008-12-23 16:01:51 UTC (rev 1018)
@@ -33,8 +33,11 @@
* @since Stripes 1.4
*/
public abstract class LinkTagSupport extends HtmlTagSupport implements
ParameterizableTag {
+ /** Initial value for fields to indicate they were not set by a tag
attribute. */
+ private static final String VALUE_NOT_SET = "VALUE_NOT_SET";
+
private Map<String,Object> parameters = new HashMap<String,Object>();
- private String event;
+ private String event = VALUE_NOT_SET;
private Object beanclass;
private String url;
private String anchor;
@@ -187,8 +190,8 @@
// the HtmlTagSupport will HtmlEncode the ampersands for us
String base = getPreferredBaseUrl();
UrlBuilder builder = new
UrlBuilder(pageContext.getRequest().getLocale(), base, false);
- if (this.event != null) {
- builder.setEvent(this.event);
+ if (this.event != VALUE_NOT_SET) {
+ builder.setEvent(this.event == null || this.event.length() < 1 ?
null : this.event);
}
if (addSourcePage) {
builder.addParameter(StripesConstants.URL_KEY_SOURCE_PAGE,
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development