From 2a0b87bc84648f608fd85eb58b2aa4c035a60961 Mon Sep 17 00:00:00 2001 From: "Eric J. Bowersox" Date: Fri, 16 Apr 2004 03:40:10 +0000 Subject: [PATCH] changed code generation for target attribute in xlink tags, in an attempt to fix a HTML-generation problem with Electric Minds' "Posts" pages --- .../silverwrist/venice/ui/jsp/UtilTargetTag.java | 2 +- .../silverwrist/venice/ui/jsp/UtilXLinkTag.java | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/com/silverwrist/venice/ui/jsp/UtilTargetTag.java b/src/com/silverwrist/venice/ui/jsp/UtilTargetTag.java index 858357e..5928d74 100644 --- a/src/com/silverwrist/venice/ui/jsp/UtilTargetTag.java +++ b/src/com/silverwrist/venice/ui/jsp/UtilTargetTag.java @@ -33,7 +33,7 @@ public class UtilTargetTag extends VeniceBodyTagSupport UtilXLinkTag xlink = (UtilXLinkTag)findAncestorWithClass(this,UtilXLinkTag.class); if (xlink!=null) { // set the link data - xlink.setTarget(getBodyContent().getString().trim()); + xlink.setTarget2(getBodyContent().getString().trim()); return SKIP_BODY; } // end if diff --git a/src/com/silverwrist/venice/ui/jsp/UtilXLinkTag.java b/src/com/silverwrist/venice/ui/jsp/UtilXLinkTag.java index ed4b570..99ab01c 100644 --- a/src/com/silverwrist/venice/ui/jsp/UtilXLinkTag.java +++ b/src/com/silverwrist/venice/ui/jsp/UtilXLinkTag.java @@ -45,6 +45,7 @@ public class UtilXLinkTag extends VeniceBodyTagSupport private String target = null; private String text = null; private String title = null; + private boolean target_external = false; /*-------------------------------------------------------------------------------- * Overrides from class BodyTagSupport @@ -105,6 +106,9 @@ public class UtilXLinkTag extends VeniceBodyTagSupport type = -1; text = null; title = null; + if (target_external) + target = null; + target_external = false; return EVAL_PAGE; } // end doEndTag @@ -158,4 +162,15 @@ public class UtilXLinkTag extends VeniceBodyTagSupport } // end setTitle + final void setTarget2(String s) + { + if (target==null) + { // set target via external tag + target = s; + target_external = true; + + } // end if + + } // end setTarget2 + } // end class UtilXLinkTag