Author: dolander
Date: Sat Jul 17 14:05:04 2004
New Revision: 23010
Modified:
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/HtmlUtils.java
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/ScriptReporter.java
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Body.java
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Html.java
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/ScriptContainer.java
incubator/beehive/trunk/netui/src/util/schema/netui-config.xsd
Log:
Remove the support for "LegacyTags". This was in place when the beehive tags
were
to maintain backward compatibility with the NetUI 8.1 tags. This is no longer a
requirement so I've removed the support added to the tags.
The only remaining support was for writting out JavaScript before the HTML
<head>
element which is not legal HTML but was how the 8.1 tags did it.
The LegacyTags element was not removed from the XML configuration file. I
marked this as a future todo.
This was not removed because I need support from Eddie for rebuilding the
templates and some
remaining dependencies in the WLW source code.
Review: Eddie
Modified:
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/HtmlUtils.java
==============================================================================
---
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/HtmlUtils.java
(original)
+++
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/HtmlUtils.java
Sat Jul 17 14:05:04 2004
@@ -33,24 +33,6 @@
public class HtmlUtils
{
/**
- * Return the legacy mode of the the tag library.
- * @param sr
- * @return
- */
- public static boolean isLegacy(ScriptReporter sr)
- {
- if (sr != null && sr.isRunAtClient())
- return false;
-
- NetuiConfigDocument.NetuiConfig config = ConfigUtil.getConfig();
- if (config == null)
- return false;
-
- return config.getLegacyTagSupport();
- }
-
-
- /**
* Filter the specified value for characters that are sensitive to
* HTML interpreters. It will return a string with these characters
replaced
* with HTML entities. This method calls the overloaded method with
<code>markupHTMLSpaceReturn</code>
Modified:
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/ScriptReporter.java
==============================================================================
---
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/ScriptReporter.java
(original)
+++
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/ScriptReporter.java
Sat Jul 17 14:05:04 2004
@@ -89,11 +89,4 @@
* @return <code>true</code> if the <code>writeInitScript</code> method
has been called.
*/
boolean isInitScriptWritten();
-
- /**
- * Return <code>true</code> the tag set is in legacy mode.
- * @return
- */
- boolean isLegacy();
-
}
Modified:
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Body.java
==============================================================================
---
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Body.java
(original)
+++
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Body.java
Sat Jul 17 14:05:04 2004
@@ -107,8 +107,7 @@
reportCollectedErrors(results);
// write out the script before the end tag.
- // @todo: need to think about legacy support. This is a new tag
so we can break legacy support.
- if (!sr.isLegacy() && sr.isInitScriptWritten()) {
+ if (sr.isInitScriptWritten()) {
sr.writeScript(results);
}
}
Modified:
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Html.java
==============================================================================
---
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Html.java
(original)
+++
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Html.java
Sat Jul 17 14:05:04 2004
@@ -24,7 +24,6 @@
import org.apache.beehive.netui.tags.rendering.TagRenderingBase;
import org.apache.beehive.netui.util.Bundle;
import org.apache.struts.Globals;
-import org.apache.struts.util.ResponseUtils;
import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServletRequest;
@@ -261,15 +260,13 @@
*/
public int doEndTag() throws JspException
{
-
+ // 8.1 Compatibility:
// For backward compatbility with 8.1, we will continue to write this
here
// For runAtClient and 9.0 JavaScript support we will run this
// here which puts all of the code at the end right before the </html>
tag.
// For backward compatbility we leave it at the top.
- if (isLegacy()) {
- String script = writeScriptBlock();
- ResponseUtils.write(pageContext, script);
- }
+ // String script = writeScriptBlock();
+ // ResponseUtils.write(pageContext, script);
StringBuilder sb = new StringBuilder(128);
if (_saveBody != null)
@@ -288,14 +285,10 @@
sb.append("</div>");
}
- // in non-legacy mode, we will the script can be written out by
another tag.
- // typically this would be the <body> tag. If it hasn't been written
out, then we
- // will right it out now.
- // @todo: should we just require a body tag and not do this?
- if (!isLegacy()) {
- if (!isScriptWritten() && isInitScriptWritten()) {
- writeScript(sb);
- }
+ // the script can be written out by another tag, typically this would
be the <body> tag.
+ // If it hasn't been written out, then we will right it out now.
+ if (!isScriptWritten() && isInitScriptWritten()) {
+ writeScript(sb);
}
// close the html tag
Modified:
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/ScriptContainer.java
==============================================================================
---
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/ScriptContainer.java
(original)
+++
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/ScriptContainer.java
Sat Jul 17 14:05:04 2004
@@ -19,7 +19,6 @@
package org.apache.beehive.netui.tags.html;
import org.apache.beehive.netui.tags.AbstractBaseTag;
-import org.apache.beehive.netui.tags.HtmlUtils;
import org.apache.beehive.netui.tags.ScriptReporter;
import javax.servlet.http.HttpServletRequest;
@@ -69,7 +68,6 @@
private boolean _runAtClient = false;
private boolean _writeScript = false;
private boolean _writeInitScript = false;
- private boolean _legacy = false;
/**
* Returns the name of the Tag.
@@ -256,8 +254,6 @@
public int doStartTag()
throws JspException
{
- establishTagMode();
-
// if there is a scopeId, then we need to create a div to contains
// everything
StringBuilder sb = new StringBuilder(64);
@@ -269,11 +265,7 @@
sb.append(">");
}
- if (_legacy)
- writeInitScript(sb);
-
write(sb.toString());
-
return EVAL_BODY_BUFFERED;
}
@@ -317,28 +309,6 @@
}
/////////////////////////////////// Protected Support
////////////////////////////////////
-
- /**
- * This sets the state of the legacy flag. Legacy mode supports the tags
set
- * in backward compatability mode. There are serveral areas where
backward features
- * are changed but legacy mode leaves the features working as they did in
WLS 8.1. Legacy mode
- * is set in in the WLS 8.1 NetUI configuration file by default.
- */
- protected void establishTagMode()
- {
- _legacy = HtmlUtils.isLegacy(this);
- }
-
- /**
- * Returns a boolean indicating that we are in Legacy Mode.
- * @return <code>true</code> if legacy mode is on.
- */
- public final boolean isLegacy()
- {
- // @todo: this is to be removed. This was used to support features
from WLW
- return _legacy;
- }
-
/**
* This method will add the initialization code to NetUI.
*/
@@ -498,7 +468,6 @@
_runAtClient = false;
_writeScript = false;
_writeInitScript = false;
- _legacy = false;
if (_funcBlocks != null)
_funcBlocks.clear();
Modified: incubator/beehive/trunk/netui/src/util/schema/netui-config.xsd
==============================================================================
--- incubator/beehive/trunk/netui/src/util/schema/netui-config.xsd
(original)
+++ incubator/beehive/trunk/netui/src/util/schema/netui-config.xsd Sat Jul
17 14:05:04 2004
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- @todo: need to remove the legacy-tag-support from this -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://beehive.apache.org/netui/2004/server/config"
xmlns:netui="http://beehive.apache.org/netui/2004/server/config"