You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by di...@apache.org on 2005/01/10 04:21:34 UTC
cvs commit: jakarta-commons/jelly/jelly-tags/xml/src/java/org/apache/commons/jelly/tags/xml TransformTag.java
dion 2005/01/09 19:21:34
Modified: jelly/jelly-tags/xml/src/java/org/apache/commons/jelly/tags/xml
TransformTag.java
Log:
Remove references to WeakReferenceWrapperScript
Revision Changes Path
1.8 +3 -52 jakarta-commons/jelly/jelly-tags/xml/src/java/org/apache/commons/jelly/tags/xml/TransformTag.java
Index: TransformTag.java
===================================================================
RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/xml/src/java/org/apache/commons/jelly/tags/xml/TransformTag.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- TransformTag.java 28 Dec 2004 01:39:23 -0000 1.7
+++ TransformTag.java 10 Jan 2005 03:21:34 -0000 1.8
@@ -48,7 +48,6 @@
import org.apache.commons.jelly.impl.ScriptBlock;
import org.apache.commons.jelly.impl.StaticTagScript;
import org.apache.commons.jelly.impl.TagScript;
-import org.apache.commons.jelly.impl.WeakReferenceWrapperScript;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.dom4j.Document;
@@ -360,10 +359,7 @@
// find any nested param tags and run them
Script bodyScript = this.getBody();
- if (bodyScript instanceof WeakReferenceWrapperScript) {
- WeakReferenceWrapperScript wrws = (WeakReferenceWrapperScript) bodyScript;
- invokeNestedTagsOfType(wrws, ParamTag.class,context,output);
- }else if (bodyScript instanceof ScriptBlock) {
+ if (bodyScript instanceof ScriptBlock) {
ScriptBlock scriptBlock = (ScriptBlock) bodyScript;
List scriptList = scriptBlock.getScriptList();
for (Iterator iter = scriptList.iterator(); iter.hasNext(); ) {
@@ -387,46 +383,6 @@
}
}
- /** Locates all child TagScripts, whose tags are of the type
- * given. These tags are executed with the provided JellyContext and output.
- * <p/>
- * <strong>This method is in place
- * to support specific features in the XML tag library and
- * shouldn't be used by anyone at all.
- * This method will be removed in a near-future verison of jelly.</strong>
- * <p/>
- *
- * XXX if possible, this is actually more bogus than "containsScriptType", it must be removed ASAP
- *
- * @param clazz Execute all child tags of this type
- * @param output The output to use when executing the tags.
- * @throws JellyTagException
- */
- public void invokeNestedTagsOfType(WeakReferenceWrapperScript wrws, Class clazz, JellyContext context, XMLOutput output) throws JellyTagException {
- Object bodyScript = wrws.script();
-
- if (bodyScript instanceof ScriptBlock) {
- ScriptBlock scriptBlock = (ScriptBlock) bodyScript;
- List scriptList = scriptBlock.getScriptList();
- for (Iterator iter = scriptList.iterator(); iter.hasNext(); ) {
- Script script = (Script) iter.next();
- if (script instanceof TagScript) {
-
- Tag tag = null;
- try {
- tag = ((TagScript) script).getTag(getContext());
- } catch (JellyException e) {
- throw new JellyTagException(e);
- }
-
- if (tag instanceof ParamTag) {
- script.run(context, output);
- }
- } // instanceof
- } // for
- } // if
- }
-
/** A helper class that converts a transform tag body to an XMLReader
* to hide the details of where the input for the transform is obtained
@@ -540,11 +496,6 @@
boolean result = false;
// check to see if we need to parse the body or just invoke it
Script bodyScript = this.tag.getBody();
-
- if (bodyScript instanceof WeakReferenceWrapperScript) {
- WeakReferenceWrapperScript wrws = (WeakReferenceWrapperScript) bodyScript;
- return wrws.containsScriptType(StaticTagScript.class);
- }
if (bodyScript instanceof ScriptBlock) {
ScriptBlock scriptBlock = (ScriptBlock) bodyScript;
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org