Author: dolander
Date: Sat Aug  7 11:23:33 2004
New Revision: 36069

Added:
   
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/AbstractSimpleTag.java
   
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/ErrorHandling.java
   
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/IErrorReporter.java
      - copied, changed from rev 36068, 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/ErrorReporter.java
   
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/IScriptReporter.java
      - copied, changed from rev 36068, 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/ScriptReporter.java
Removed:
   
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/DefaultableDataSourceTag.java
   
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/ErrorReporter.java
   
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/OptionsDataSourceTag.java
   
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/ScriptReporter.java
Modified:
   
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/AbstractBaseTag.java
   
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Anchor.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/FormatTag.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/JavaScriptUtils.java
   
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/ScriptHeader.java
   
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/tree/Tree.java
   
incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/DivPanel.java
   
incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/Template.java
Log:
Rename the ScriptReporter and ErrorReporter interfaces to being with an 'I' as 
our convention suggests




Modified: 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/AbstractBaseTag.java
==============================================================================
--- 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/AbstractBaseTag.java
      (original)
+++ 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/AbstractBaseTag.java
      Sat Aug  7 11:23:33 2004
@@ -106,8 +106,6 @@
     }
 
     private List _errors = null;                // the errors registered for 
the tag
-    private Map generalMap = null;              // the map of general 
attributes
-    private Map generalExpressionMap = null;    // the map of expression 
attributes
     private ExpressionEvaluator ee = null;      // cache the expression 
evaluator
 
     /////////////////////////// Generic Services support 
////////////////////////////
@@ -125,11 +123,7 @@
     protected void localRelease()
     {
         ee = null;
-        if (generalMap != null)
-            generalMap.clear();
-        if (generalExpressionMap != null)
-            generalExpressionMap.clear();
-        _errors = null;
+       _errors = null;
 
         // null the current tag
         ImplicitObjectBean bean = 
ImplicitObjectUtil.getImplicitObjects(pageContext, this);
@@ -223,7 +217,7 @@
      * tag and release during <code>localRelease</code>.
      * @return the <code>ExpressionEvalutor</code> for tis tag.
      */
-    protected final ExpressionEvaluator getExpressionEvaluator()
+    private final ExpressionEvaluator getExpressionEvaluator()
     {
         if (ee == null)
             ee = ExpressionEvaluatorFactory.getInstance();
@@ -374,7 +368,7 @@
 
      /**
      */
-    protected boolean isExpression(String expression)
+    private boolean isExpression(String expression)
     {
         // @TODO: eko -- push this into the ExpressionEvaluator
         if (expression == null)
@@ -572,7 +566,7 @@
         return URLRewriterService.rewriteName(pageContext.getServletContext(), 
pageContext.getRequest(), name);
     }
 
-    ///////////////////////////  Generic Error Reporting Support  
////////////////////////////
+    ///////////////////////////  Generic Attribute Setting Support  
////////////////////////////
 
     /**
      * Report an error if the value of <code>attrValue</code> is equal to the 
empty string, otherwise return
@@ -609,6 +603,8 @@
         return ("".equals(attrValue)) ? null : attrValue;
     }
 
+    ///////////////////////////  Generic Error Reporting Support  
////////////////////////////
+
     /**
      * This will report an error from a tag.  The error will
      * contain a message.  If error reporting is turned off,
@@ -633,7 +629,7 @@
         tei.message = message;
         _errors.add(tei);
 
-        ErrorReporter er = getErrorReporter();
+        IErrorReporter er = getErrorReporter();
         if (er == null) {
             tei.errorNo = -1;
             if (!reportErrorInPage) {
@@ -668,7 +664,7 @@
      * is called, <code>hasErrors</code> will return true.
      * @param error The <code>EvalErrorInfo</code> describing the error.
      */
-    public void registerError(EvalErrorInfo error)
+    private void registerError(EvalErrorInfo error)
     {
         assert (error != null);
 
@@ -678,7 +674,7 @@
 
         _errors.add(error);
 
-        ErrorReporter er = getErrorReporter();
+        IErrorReporter er = getErrorReporter();
         if (er == null) {
             error.errorNo = -1;
             return;
@@ -713,6 +709,16 @@
         write(getErrorsReport());
     }
 
+    protected int reportAndExit(int returnValue)
+        throws JspException
+    {
+        if (hasErrors()) {
+            reportErrors();
+        }
+        localRelease();
+        return returnValue;
+    }
+
     /**
      * This method will return a <code>String<code> that represents all of the 
errors that were
      * registered for the tag.  This method assumes that there are errors in 
the tag and asserts
@@ -801,7 +807,7 @@
     protected final void reportCollectedErrors(StringBuilder sb)
     {
 
-        ErrorReporter er = getErrorReporter();
+        IErrorReporter er = getErrorReporter();
         if (er == null)
             return;
 
@@ -852,13 +858,13 @@
      * tag.  Searching starts with this tag.
      * @return an <code>ErrorReporter</code> if one is found in the parental 
chain, otherwise null.
      */
-    private ErrorReporter getErrorReporter()
+    private IErrorReporter getErrorReporter()
     {
         // check to see if this tag has is an ErrorReporter or has an 
ErrorReporter as a parent
         Tag par = this;
         while (par != null) {
-            if (par instanceof ErrorReporter) {
-                ErrorReporter er = (ErrorReporter) par;
+            if (par instanceof IErrorReporter) {
+                IErrorReporter er = (IErrorReporter) par;
                 if (er.isReporting())
                     return er;
             }
@@ -873,12 +879,12 @@
      * at this node an moves upward through the parental chain.
      * @return a <code>ScriptReporter</code> or null if there is not one found.
      */
-    protected ScriptReporter getScriptReporter()
+    protected IScriptReporter getScriptReporter()
     {
         Tag parentTag = getParent();
         while (parentTag != null) {
-            if (parentTag instanceof ScriptReporter) {
-                return (ScriptReporter) parentTag;
+            if (parentTag instanceof IScriptReporter) {
+                return (IScriptReporter) parentTag;
             }
             parentTag = parentTag.getParent();
         }
@@ -899,7 +905,7 @@
      */
     protected String addTagIdMapping(String tagId, String value)
     {
-        ScriptReporter scriptReporter = getScriptReporter();
+        IScriptReporter scriptReporter = getScriptReporter();
         if (scriptReporter != null) {
             scriptReporter.addTagId(tagId, value);
             return null;

Added: 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/AbstractSimpleTag.java
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/AbstractSimpleTag.java
    Sat Aug  7 11:23:33 2004
@@ -0,0 +1,7 @@
+package org.apache.beehive.netui.tags;
+
+import javax.servlet.jsp.tagext.SimpleTagSupport;
+
+public class AbstractSimpleTag extends SimpleTagSupport
+{
+}

Added: 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/ErrorHandling.java
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/ErrorHandling.java
        Sat Aug  7 11:23:33 2004
@@ -0,0 +1,275 @@
+package org.apache.beehive.netui.tags;
+
+import org.apache.beehive.netui.util.Bundle;
+import org.apache.beehive.netui.util.logging.Logger;
+
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.JspTag;
+import javax.servlet.jsp.tagext.SimpleTagSupport;
+import java.util.ArrayList;
+import java.util.List;
+import java.io.Writer;
+import java.io.IOException;
+
+public class ErrorHandling
+{
+    /**
+     * static flag indicating if we are reporting errors in-page or throwing 
JspExceptions.
+     */
+    private static boolean reportErrorInPage = true;
+    private static final Logger logger = 
Logger.getInstance(ErrorHandling.class);
+
+    private List _errors;
+
+    /**
+     * This will report an error from a tag.  The error will
+     * contain a message.  If error reporting is turned off,
+     * the message will be returned and the caller should throw
+     * a JspException to report the error.
+     * @param message - the message to register with the error
+     * @throws javax.servlet.jsp.JspException - if in-page error reporting is 
turned off this method will always
+     *                      throw a JspException.
+     */
+    public void registerTagError(String message, String tagName, JspTag 
tag,Throwable e)
+            throws JspException
+    {
+        assert (message != null) : "parameter 'message' must not be null.";
+
+        // add the error to the list of errors
+        if (_errors == null)
+            _errors = new ArrayList();
+
+        TagErrorInfo tei = new TagErrorInfo();
+
+        tei.tagType = tagName;
+        tei.message = message;
+        _errors.add(tei);
+
+        IErrorReporter er = getErrorReporter(tag);
+        if (er == null) {
+            tei.errorNo = -1;
+            if (!reportErrorInPage) {
+                String s = Bundle.getString("Tags_NoInPageErrorReporting", new 
Object[]{message});
+                if (e == null)
+                    logger.error(s);
+                else
+                    logger.error(s, e);
+                //localRelease();
+                throw new JspException(message);
+            }
+            return;
+        }
+
+        // add the error to the ErrorReporter tag
+        er.addError(tei);
+        assert (tei.errorNo > 0);
+        if (!reportErrorInPage) {
+            String s = Bundle.getString("Tags_NoInPageErrorReporting", new 
Object[]{message});
+            if (e == null)
+                logger.error(s);
+            else
+                logger.error(s, e);
+            //localRelease();
+            throw new JspException(s);
+        }
+        return;
+    }
+
+    /**
+     * This method will add an error to the errors begin tracked by the tag. 
After the first time this method
+     * is called, <code>hasErrors</code> will return true.
+     * @param error The <code>EvalErrorInfo</code> describing the error.
+     */
+    public void registerError(EvalErrorInfo error,JspTag tag)
+    {
+        assert (error != null);
+
+        // add the error to the list of errors
+        if (_errors == null)
+            _errors = new ArrayList();
+
+        _errors.add(error);
+
+        IErrorReporter er = getErrorReporter(tag);
+        if (er == null) {
+            error.errorNo = -1;
+            return;
+        }
+
+        // add the error to the ErrorReporter tag
+        er.addError(error);
+        assert (error.errorNo > 0);
+    }
+
+    /**
+     * This method will return <code>true</code> if there have been any errors 
registered on this
+     * tag.  Otherwise it returns <code>false</code>
+     * @return <code>true</code> if errors have been reported on this tag.
+     * @see #registerError
+     */
+    protected boolean hasErrors()
+    {
+        return (_errors != null);
+    }
+
+    /**
+     * This method will write out the <code>String</code> returned by 
<code>getErrorsReport</code> to the
+     * response output stream.
+     * @throws JspException if <code>write</code> throws an exception.
+     * @see #getErrorsReport
+     */
+    protected void reportErrors(Writer writer,String tagName)
+            throws JspException
+    {
+        try {
+            writer.write(getErrorsReport(tagName));
+        }
+        catch (IOException e) {
+            throw new JspException(e.getMessage(),e);
+        }
+    }
+    /**
+     * This method will return a <code>String<code> that represents all of the 
errors that were
+     * registered for the tag.  This method assumes that there are errors in 
the tag and asserts
+     * this is true.  Code will typically call <code>hasErrors</code> before 
calling this method.
+     * @return A <code>String</code> that contains all of the errors 
registered on this tag.
+     * @see #registerError
+     */
+    protected String getErrorsReport(String tagName)
+    {
+        assert _errors != null;
+        assert _errors.size() > 0;
+
+        int cnt = _errors.size();
+
+        StringBuilder sb = new StringBuilder(128);
+
+        // check the first error to see if we are reporting errors at the end
+        AbstractPageError info = (AbstractPageError) _errors.get(0);
+        if (info.errorNo > 0) {
+            String s;
+            if (info instanceof EvalErrorInfo) {
+                s = Bundle.getString("Expression_Error");
+                s = Bundle.getString("Inline_error",
+                        new Object[]{
+                            s,
+                            Integer.toString(info.errorNo),
+                            tagName,
+                        });
+            }
+            else if (info instanceof TagErrorInfo) {
+                s = Bundle.getString("Tag_Error");
+                s = Bundle.getString("Inline_error",
+                        new Object[]{
+                            s,
+                            Integer.toString(info.errorNo),
+                            tagName,
+                        });
+            }
+            else {
+                s = null;
+                assert true : "Unhandled type";
+            }
+            sb.append(s);
+            return s.toString();
+        }
+
+        // create the errors
+        String s;
+        s = Bundle.getString("Tag_Header",
+                new Object[]{tagName, Integer.toString(cnt)});
+        sb.append(s);
+
+        Object[] args = new Object[4];
+        for (int i = 0; i < cnt; i++) {
+            Object o = _errors.get(i);
+            if (o instanceof EvalErrorInfo) {
+                EvalErrorInfo e = (EvalErrorInfo) o;
+                assert info != null;
+
+                args[0] = Bundle.getString("Expression_Error");
+                args[1] = e.attr;
+                args[2] = e.expression;
+                args[3] = e.evalExcp.getMessage();
+                s = Bundle.getString("Expression_Error_Line", args);
+            }
+            else if (o instanceof TagErrorInfo) {
+                TagErrorInfo e = (TagErrorInfo) o;
+                assert info != null;
+
+                args[0] = Bundle.getString("Tag_Error");
+                args[1] = e.message;
+                s = Bundle.getString("Tag_Error_Line", args);
+            }
+            sb.append(s);
+        }
+
+        s = Bundle.getString("Tag_Footer");
+        sb.append(s);
+        return sb.toString();
+    }
+
+    /**
+     * This method get the current errors and write the formated output
+     * @param sb
+     */
+    protected final void reportCollectedErrors(StringBuilder sb,JspTag tag)
+    {
+
+        IErrorReporter er = getErrorReporter(tag);
+        if (er == null)
+            return;
+
+        assert (sb != null);
+        ArrayList errors = er.returnErrors();
+        if (errors == null || errors.size() == 0)
+            return;
+
+        assert(errors.size() > 0);
+
+        String s;
+        // write the error header
+        s = Bundle.getString("Footer_Error_Header");
+        sb.append(s);
+
+        int cnt = errors.size();
+        Object[] args = new Object[5];
+        for (int i = 0; i < cnt; i++) {
+            Object o = errors.get(i);
+            assert (o != null);
+            if (o instanceof EvalErrorInfo) {
+                EvalErrorInfo err = (EvalErrorInfo) o;
+                args[0] = Integer.toString(err.errorNo);
+                args[1] = err.tagType;
+                args[2] = err.attr;
+                args[3] = err.expression;
+                args[4] = err.evalExcp.getMessage();
+                s = Bundle.getString("Footer_Error_Expr_Body", args);
+                sb.append(s);
+            }
+            else if (o instanceof TagErrorInfo) {
+                TagErrorInfo tei = (TagErrorInfo) o;
+                args[0] = Integer.toString(tei.errorNo);
+                args[1] = tei.tagType;
+                args[2] = tei.message;
+                s = Bundle.getString("Footer_Error_Tag_Body", args);
+                sb.append(s);
+            }
+        }
+
+        // write the error footer
+        s = Bundle.getString("Footer_Error_Footer");
+        sb.append(s);
+    }
+
+    /**
+     * This method will return the first <code>ErrorReporter</code> in the 
parental chain of the
+     * tag.  Searching starts with this tag.
+     * @return an <code>ErrorReporter</code> if one is found in the parental 
chain, otherwise null.
+     */
+    private IErrorReporter getErrorReporter(JspTag tag)
+    {
+        // check to see if this tag has is an ErrorReporter or has an 
ErrorReporter as a parent
+        return (IErrorReporter) 
SimpleTagSupport.findAncestorWithClass(tag,IErrorReporter.class);
+    }
+}

Copied: 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/IErrorReporter.java
 (from rev 36068, 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/ErrorReporter.java)
==============================================================================
--- 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/ErrorReporter.java
        (original)
+++ 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/IErrorReporter.java
       Sat Aug  7 11:23:33 2004
@@ -31,7 +31,7 @@
  * it must clear this when processing it's <code>doEndTag()</code> method 
because it will not be
  * able to report errors after this point.
  */
-public interface ErrorReporter
+public interface IErrorReporter
 {
     /**
      * This is a request scoped attribute name which may contain an 
ErrorReporter instance.  If this

Copied: 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/IScriptReporter.java
 (from rev 36068, 
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/IScriptReporter.java
      Sat Aug  7 11:23:33 2004
@@ -25,7 +25,7 @@
  * will implement a map beteween the TagId and the real <code>name</code> or 
<code>id</code> attribute
  * written into the HTML.
  */
-public interface ScriptReporter
+public interface IScriptReporter
 {
     /**
      * This method will add Script as top level code that runs when

Modified: 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Anchor.java
==============================================================================
--- 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Anchor.java
  (original)
+++ 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Anchor.java
  Sat Aug  7 11:23:33 2004
@@ -22,7 +22,7 @@
 import org.apache.beehive.netui.pageflow.util.PageflowTagUtils;
 import org.apache.beehive.netui.pageflow.util.URLRewriter;
 import org.apache.beehive.netui.pageflow.util.URLRewriterService;
-import org.apache.beehive.netui.tags.ScriptReporter;
+import org.apache.beehive.netui.tags.IScriptReporter;
 import org.apache.beehive.netui.tags.rendering.AbstractHtmlState;
 import org.apache.beehive.netui.tags.rendering.AnchorTag;
 import org.apache.beehive.netui.tags.rendering.TagRenderingBase;
@@ -756,7 +756,7 @@
         }
 
         // We need to combine the onclick features
-        ScriptReporter sr = getScriptReporter();
+        IScriptReporter sr = getScriptReporter();
         if (sr != null && sr.isRunAtClient()) {
             if (_clientAction == null) {
                 if (_state.onClick == null) {

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 Aug  7 11:23:33 2004
@@ -18,7 +18,7 @@
  */
 package org.apache.beehive.netui.tags.html;
 
-import org.apache.beehive.netui.tags.ScriptReporter;
+import org.apache.beehive.netui.tags.IScriptReporter;
 import org.apache.beehive.netui.tags.rendering.AbstractHtmlState;
 import org.apache.beehive.netui.tags.rendering.BodyTag;
 import org.apache.beehive.netui.tags.rendering.TagRenderingBase;
@@ -96,7 +96,7 @@
 
         results.append(_text);
 
-        ScriptReporter sr = getScriptReporter();
+        IScriptReporter sr = getScriptReporter();
         if (sr != null) {
             if (!sr.isInitScriptWritten()) {
                 String s = Bundle.getString("Tags_ClientReqScriptHeader", 
null);

Modified: 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/FormatTag.java
==============================================================================
--- 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/FormatTag.java
       (original)
+++ 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/FormatTag.java
       Sat Aug  7 11:23:33 2004
@@ -19,6 +19,7 @@
 package org.apache.beehive.netui.tags.html;
 
 import org.apache.beehive.netui.tags.AbstractBaseTag;
+import org.apache.beehive.netui.tags.AbstractSimpleTag;
 import org.apache.beehive.netui.util.Bundle;
 import org.apache.beehive.netui.util.logging.Logger;
 
@@ -31,8 +32,6 @@
  */
 public abstract class FormatTag extends AbstractBaseTag
 {
-    private static final Logger logger = Logger.getInstance(FormatTag.class);
-
     private String _language = null;
     private String _country = null;
     protected String _pattern = null;        // The pattern used by a 
FormatTag to do its formatting.
@@ -70,7 +69,6 @@
             if (_language == null) {
                 String s = Bundle.getString("Tags_LocaleRequiresLanguage",new 
Object[]{_country});
                 registerTagError(s,null);
-                logger.warn(s);
                 return super.getUserLocale();
             }
 

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 Aug  7 11:23:33 2004
@@ -19,7 +19,7 @@
 package org.apache.beehive.netui.tags.html;
 
 import org.apache.beehive.netui.tags.AbstractPageError;
-import org.apache.beehive.netui.tags.ErrorReporter;
+import org.apache.beehive.netui.tags.IErrorReporter;
 import org.apache.beehive.netui.tags.rendering.HtmlTag;
 import org.apache.beehive.netui.tags.rendering.TagRenderingBase;
 import org.apache.beehive.netui.util.Bundle;
@@ -85,7 +85,7 @@
  * whitespace="indent"
  */
 public class Html extends ScriptContainer
-        implements ErrorReporter
+        implements IErrorReporter
 {
     /**
      * The HTML tag is registered into the request with this name.  This 
allows tags reporting
@@ -109,7 +109,7 @@
     private boolean _useLocale = false;     // include 
xml:lang=defaultLocale.getLanguage()
     private String _saveBody = null;        // the saved body content
     private ArrayList _errors;              // errors
-    private ErrorReporter _containerErrors; //Check to see if there is a 
parent error reporter
+    private org.apache.beehive.netui.tags.IErrorReporter _containerErrors; 
//Check to see if there is a parent error reporter
     private int _uniqueId = 0;              // unique id sequence
 
     private String _docType;                // The document type
@@ -199,7 +199,7 @@
     {
         // check to see if there is a scope id
         ServletRequest req = pageContext.getRequest();
-        _containerErrors = (ErrorReporter) req.getAttribute(CONTAINER_ERRORS);
+        _containerErrors = (org.apache.beehive.netui.tags.IErrorReporter) 
req.getAttribute(CONTAINER_ERRORS);
 
         //Make this tag available to child tags
         req.setAttribute(HTML_TAG_ID, this);
@@ -300,8 +300,8 @@
         if (_containerErrors == null && _errors == null) {
             Tag par = getParent();
             while (par != null) {
-                if (par instanceof ErrorReporter) {
-                    _containerErrors = (ErrorReporter) par;
+                if (par instanceof 
org.apache.beehive.netui.tags.IErrorReporter) {
+                    _containerErrors = 
(org.apache.beehive.netui.tags.IErrorReporter) par;
                     break;
                 }
                 par = par.getParent();

Modified: 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/JavaScriptUtils.java
==============================================================================
--- 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/JavaScriptUtils.java
 (original)
+++ 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/JavaScriptUtils.java
 Sat Aug  7 11:23:33 2004
@@ -18,7 +18,7 @@
  */
 package org.apache.beehive.netui.tags.html;
 
-import org.apache.beehive.netui.tags.ScriptReporter;
+import org.apache.beehive.netui.tags.IScriptReporter;
 
 import java.io.Serializable;
 import java.text.MessageFormat;
@@ -34,7 +34,7 @@
     private boolean _rollover = false;
     private boolean _writeLookupMethods = false;
 
-    public String writeAnchorFormSubmit(ScriptReporter scriptReporter)
+    public String writeAnchorFormSubmit(IScriptReporter scriptReporter)
     {
         // check to see if we have already written out the form submit
         if (_anchorFormSubmit)
@@ -105,7 +105,7 @@
     /**
      *
      */
-    public String writeRollover(ScriptReporter scriptReporter)
+    public String writeRollover(IScriptReporter scriptReporter)
     {
         if (_rollover)
             return null;
@@ -122,7 +122,7 @@
         return sb.toString();
     }
 
-    public String writeIdMap(ScriptReporter scriptRepoter, String entries)
+    public String writeIdMap(IScriptReporter scriptRepoter, String entries)
     {
         String s = getString("idMappingTable", new Object[]{entries});
         if (scriptRepoter != null) {
@@ -132,7 +132,7 @@
         return s;
     }
 
-    public String writeNetuiNameFunctions(ScriptReporter scriptReporter)
+    public String writeNetuiNameFunctions(IScriptReporter scriptReporter)
     {
         if (_writeLookupMethods)
             return null;

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 Aug  7 11:23:33 2004
@@ -19,7 +19,7 @@
 package org.apache.beehive.netui.tags.html;
 
 import org.apache.beehive.netui.tags.AbstractBaseTag;
-import org.apache.beehive.netui.tags.ScriptReporter;
+import org.apache.beehive.netui.tags.IScriptReporter;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.jsp.JspException;
@@ -66,7 +66,7 @@
  * @netui.tldx:tag 
renderer="workshop.netui.jspdesigner.tldx.ScriptContainerRenderer" 
whitespace="indent"
  */
 public class ScriptContainer extends AbstractBaseTag
-        implements ScriptReporter
+        implements IScriptReporter
 {
     private String _saveBody = null;  // the saved body content of the tag
     private String _scopeId = null;

Modified: 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/ScriptHeader.java
==============================================================================
--- 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/ScriptHeader.java
    (original)
+++ 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/ScriptHeader.java
    Sat Aug  7 11:23:33 2004
@@ -19,7 +19,7 @@
 package org.apache.beehive.netui.tags.html;
 
 import org.apache.beehive.netui.tags.AbstractBaseTag;
-import org.apache.beehive.netui.tags.ScriptReporter;
+import org.apache.beehive.netui.tags.IScriptReporter;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.jsp.JspException;
@@ -83,7 +83,7 @@
     public int doStartTag() throws JspException
     {
         StringBuilder results = new StringBuilder(64);
-        ScriptReporter sr = getScriptReporter();
+        IScriptReporter sr = getScriptReporter();
         HttpServletRequest req = (HttpServletRequest) pageContext.getRequest();
 
         // write out the initialization code.

Modified: 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/tree/Tree.java
==============================================================================
--- 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/tree/Tree.java
    (original)
+++ 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/tree/Tree.java
    Sat Aug  7 11:23:33 2004
@@ -24,7 +24,7 @@
 import org.apache.beehive.netui.script.ExpressionUpdateException;
 import org.apache.beehive.netui.script.IllegalExpressionException;
 import org.apache.beehive.netui.tags.AbstractBaseTag;
-import org.apache.beehive.netui.tags.ScriptReporter;
+import org.apache.beehive.netui.tags.IScriptReporter;
 import org.apache.beehive.netui.tags.html.HtmlConstants;
 import org.apache.beehive.netui.tags.html.JavaScriptUtils;
 import org.apache.beehive.netui.tags.rendering.*;
@@ -624,7 +624,7 @@
 
         // Add the script support for the tree.
         if (_runAtClient) {
-            ScriptReporter sr = getScriptReporter();
+            IScriptReporter sr = getScriptReporter();
             sr.addInitMethod(TreeElement.TREE_JAVASCRIPT_CLASS);
             sr.addAnchorPostRewriter(TreeElement.TREE_JAVASCRIPT_CLASS);
         }

Modified: 
incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/DivPanel.java
==============================================================================
--- 
incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/DivPanel.java
        (original)
+++ 
incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/DivPanel.java
        Sat Aug  7 11:23:33 2004
@@ -19,7 +19,7 @@
 package org.apache.beehive.netui.tags.template;
 
 import org.apache.beehive.netui.tags.AbstractBaseTag;
-import org.apache.beehive.netui.tags.ScriptReporter;
+import org.apache.beehive.netui.tags.IScriptReporter;
 import org.apache.struts.util.ResponseUtils;
 
 import javax.servlet.jsp.JspException;
@@ -98,7 +98,7 @@
     {
         HttpServletRequest req = (HttpServletRequest) pageContext.getRequest();
 
-        ScriptReporter sr = getScriptReporter();
+        IScriptReporter sr = getScriptReporter();
         if (!sr.isRunAtClient()) {
             System.err.println("Script Reporter Not Run At Client");
             // @Todo: this needs to verify it is inside a script container 
that is run at client enabled.

Modified: 
incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/Template.java
==============================================================================
--- 
incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/Template.java
        (original)
+++ 
incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/Template.java
        Sat Aug  7 11:23:33 2004
@@ -20,7 +20,7 @@
 
 import org.apache.beehive.netui.tags.AbstractBaseTag;
 import org.apache.beehive.netui.tags.AbstractPageError;
-import org.apache.beehive.netui.tags.ErrorReporter;
+import org.apache.beehive.netui.tags.IErrorReporter;
 import org.apache.beehive.netui.util.Bundle;
 import org.apache.beehive.netui.util.logging.Logger;
 
@@ -90,7 +90,7 @@
  * @netui.tldx:tag renderer="workshop.netui.jspdesigner.tldx.TemplateRenderer" 
requiredchild="section setAttribute" whitespace="indent"
  */
 public class Template extends AbstractBaseTag
-        implements TemplateConstants,ErrorReporter
+        implements TemplateConstants, IErrorReporter
 {
     private static final Logger logger = Logger.getInstance(Template.class);
 
@@ -109,7 +109,7 @@
     /**
      * Inner class that is exposed to handle errors
      */
-    private ErrorReporter _innerErrors;
+    private org.apache.beehive.netui.tags.IErrorReporter _innerErrors;
 
     /**
      * Returns the name of the Tag.  This is used to
@@ -412,7 +412,7 @@
         return _reportErrors;
     }
 
-    static class InnerErrorReporter implements ErrorReporter
+    static class InnerErrorReporter implements 
org.apache.beehive.netui.tags.IErrorReporter
     {
         /**
          * The errors reported by contained tags

Reply via email to