Author: dolander
Date: Sat Jul 24 11:34:05 2004
New Revision: 23217

Removed:
   
incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/Visible.java
   incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b28633/
Modified:
   
incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/Attribute.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/IncludeSection.java
   
incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/Section.java
   
incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/SetAttribute.java
   
incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/Template.java
   
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/multipartRequest/input.jsp
   
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/upload/index.jsp
   
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/template/tempNegate/Begin.jsp
   
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/template/visible/Template.jsp
   
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/template/visibleError/Template.jsp
   
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
Log:
Cleanup the Template tags.
Remove the dead code that was commented out
Remove the Visible tag because it is basically the JSTL if tag
Update the tests that contained Visible tags.



Modified: 
incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/Attribute.java
==============================================================================
--- 
incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/Attribute.java
       (original)
+++ 
incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/Attribute.java
       Sat Jul 24 11:34:05 2004
@@ -149,15 +149,6 @@
     }
 
     /**
-     * Returns the <code>name</code> of the <code>Attribute</code>.
-     * @return the name of the <code>Attribute</code>
-     *
-     */
-    //public String getName() {
-    //    return _name;
-    //}
-
-    /**
      * Sets the <code>defaultValue</code> for the <code>Attribute</code>.
      * If the content page does not define a value for this attribute
      * through the <code>SetAttribute</code> tag, then the
@@ -185,21 +176,12 @@
     }
 
     /**
-     * Returns the <code>defaultValue</code> of the <code>Attribute</code>.
-     * @return a <code>String</code> value representing the default value.
-     */
-    //public String getDefaultValue() {
-    //    return _defaultValue;
-    //}
-
-    /**
      * Renders the content of the attribute.
      * @return EVAL_PAGE to continue evaluation of the page.
      * @throws JspException If there is any failure in the tag.
      */
     public int doStartTag()
             throws JspException {
-        //System.err.println("inside Attribute.doStartTag");
         ServletRequest req = pageContext.getRequest();
         HashMap atts = (HashMap) req.getAttribute(TEMPLATE_ATTRIBUTES);
         try {

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 Jul 24 11:34:05 2004
@@ -74,18 +74,6 @@
     }
 
     /**
-     * Return the ID of the tag.  The id may be rewritten by the container 
(such
-     * as a portal) to make sure it is unique.  JavaScript my lookup the 
actual id
-     * of the element by looking it up in the <code>netui_names</code> table 
written
-     * into the HTML.
-     * @return the tagId.
-     */
-    //public String getTagId()
-    //{
-    //    return _tagId;
-    //}
-
-    /**
      * Set the ID of the tag.
      * @param tagId - the tagId.
      * @netui:attribute required="true" rtexprvalue="true"
@@ -95,16 +83,6 @@
     {
         _tagId = tagId;
     }
-
-    /**
-     * This method will return the first page that was set.  This value will 
be used
-     * to set the first page that the divPanel should display.  If a value is 
set in the
-     * request, it will override this value.
-     * @return
-     */
-    //public String getFirstPage() {
-    //    return _firstPage;
-    //}
 
     /**
     * Set the ID of the tag.

Modified: 
incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/IncludeSection.java
==============================================================================
--- 
incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/IncludeSection.java
  (original)
+++ 
incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/IncludeSection.java
  Sat Jul 24 11:34:05 2004
@@ -168,15 +168,6 @@
     }
 
     /**
-     * Returns the <code>name</code> of the defined section within
-     * the template file.
-     * @return the name of the <code>IncludeSection</code> being defined.
-     */
-    //public String getName() {
-    //    return _name;
-    //}
-
-    /**
      * Sets a default JSP page to provide content for the section if
      * the content page does not define the content.
      * @param defaultPage a URL identifying a JSP or HTML page
@@ -195,15 +186,6 @@
     public void setDefaultPage(String defaultPage) {
         _default = defaultPage;
     }
-
-    /**
-     * Returns the URL of the JSP or HTML page providing default
-     * content to the defined section.
-     * @return the URL of the default content.
-     */
-    //public String getDefaultPage() {
-    //    return _default;
-    //}
 
     /**
      * Renders the content of the section into the template.  Errors

Modified: 
incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/Section.java
==============================================================================
--- 
incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/Section.java
 (original)
+++ 
incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/Section.java
 Sat Jul 24 11:34:05 2004
@@ -148,11 +148,6 @@
     private boolean _visible = true;
 
     /**
-     * The expression version of visibility
-     */
-    private String _visExpr;
-
-    /**
      * Returns the name of the Tag.  This is used to
      * identify the type of tag reporting errors.
      * @return a constant string representing the name of the tag.
@@ -185,23 +180,6 @@
     public void setName(String name) {
         _name = name;
     }
-
-    /**
-     * Get the name of the <code>IncludeSection</code>.
-     * @return the <code>IncludeSection</code> name.
-     */
-    //public String getName() {
-    //    return _name;
-    //}
-
-    /**
-     * Returns the visible state of the tag.
-     * @return <code>true</code> if the section is visible, <code>false</code>
-     * otherwise.
-     */
-   // public boolean isVisible() {
-    //    return _visible;
-    //}
 
     /**
      * Sets the visible state of the tag.

Modified: 
incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/SetAttribute.java
==============================================================================
--- 
incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/SetAttribute.java
    (original)
+++ 
incubator/beehive/trunk/netui/src/tags-template/org/apache/beehive/netui/tags/template/SetAttribute.java
    Sat Jul 24 11:34:05 2004
@@ -154,16 +154,6 @@
     }
 
     /**
-     * Return the name of the <code>Attribute</code> we are setting an value
-     *  for.
-     * @return A <code>String</code> value representing the name of the
-     *  Attribute.
-     */
-    //public String getName() {
-    //    return _name;
-    //}
-
-    /**
      * Set the value of the <code>Attribute</code>.  This attribute
      * may be assigned a read only expression.
      * @param value The value to use for the <code>Attribute</code>
@@ -181,27 +171,8 @@
      */
     public void setValue(String value)
         throws JspException {
-        if (containsExpression(value)) {
-            Object val = evaluateExpression(value,"value");
-            if (val != null)
-                _value = val.toString();
-            else
-                _value = "";
-        }
-        else
-            _value = value;
+        _value = value;
     }
-
-    /**
-     * Return the <code>value</code> value.  If the value is an
-     * expression, the expression will be returned, not the value referred
-     * to by the expression.
-     * @return a <code>String</code> value representing the
-     *  <code>Attribute</code> value.
-     */
-    //public String getValue() {
-    //    return _value;
-    //}
 
     /**
      * Tag Lifecycle method called when the tag is first seen.  This method

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 Jul 24 11:34:05 2004
@@ -164,14 +164,6 @@
     }
 
     /**
-     * Return a boolean indicating that the template expects the
-     * template file to report errors
-     */
-    //public boolean getReportErrors() {
-    //    return _reportErrors;
-    //}
-
-    /**
      * Set the URL of the template to use.  The <code>templatePage</code>
      * is an URL which
      * identifies the JSP template page.
@@ -190,14 +182,6 @@
     public void setTemplatePage(String templatePage) {
         _templatePage = templatePage;
     }
-
-    /**
-     * Return the URL of the template JSP page.
-     * @return a String representing the URL of the JSP template.
-     */
-   // public String getTemplatePage() {
-   //     return _templatePage;
-    //}
 
     /**
      * the tag extension lifecycle method called when the tag is first

Modified: 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/multipartRequest/input.jsp
==============================================================================
--- 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/multipartRequest/input.jsp
 (original)
+++ 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/multipartRequest/input.jsp
 Sat Jul 24 11:34:05 2004
@@ -3,6 +3,7 @@
 <%@ taglib uri="beehive-netui-tags-databinding.tld" prefix="netui-data"%>
 <%@ taglib uri="beehive-netui-tags-html.tld" prefix="netui"%>
 <%@ taglib uri="beehive-netui-tags-template.tld" prefix="netui-template"%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c"%>
     <netui-template:template templatePage="/resources/jsp/template.jsp">
         <netui-template:section name="bodySection">
             <netui:form action="someAction" enctype="multipart/form-data">
@@ -49,12 +50,12 @@
             
             <netui:anchor action="reset">reset data</netui:anchor>
             <br>
-            <netui-template:visible visibility="${pageFlow.scoped}" 
negate="true">
+            <c:if test="${!pageFlow.scoped}">
                 <netui:anchor href="MockPortal.jsp">try this in 
MockPortal</netui:anchor>
-            </netui-template:visible>
-            <netui-template:visible visibility="${pageFlow.scoped}">
+            </c:if>
+            <c:if test="${pageFlow.scoped}">
                 <netui:anchor href="multipartRequestController.jpf">try this 
outside of MockPortal</netui:anchor>
-            </netui-template:visible>
+            </c:if>
 
         </netui-template:section>
     </netui-template:template>

Modified: 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/upload/index.jsp
==============================================================================
--- 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/upload/index.jsp
   (original)
+++ 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/upload/index.jsp
   Sat Jul 24 11:34:05 2004
@@ -3,6 +3,7 @@
 <%@ taglib uri="beehive-netui-tags-databinding.tld" prefix="netui-data"%>
 <%@ taglib uri="beehive-netui-tags-html.tld" prefix="netui"%>
 <%@ taglib uri="beehive-netui-tags-template.tld" prefix="netui-template"%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c"%>
 <netui:html>
     <head>
         <title>
@@ -22,11 +23,11 @@
 
         <br>
 
-        <netui-template:visible visibility="${pageFlow.scoped}" negate="true">
+        <c:if test="${!pageFlow.scoped}">
             <netui:anchor href="MockPortal.jsp">try this in 
MockPortal</netui:anchor>
-        </netui-template:visible>
-        <netui-template:visible visibility="${pageFlow.scoped}">
+        </c:if>
+        <c:if test="${pageFlow.scoped}">
             <netui:anchor href="uploadController.jpf">try this outside of 
MockPortal</netui:anchor>
-        </netui-template:visible>
+        </c:if>
     </body>
 </netui:html>

Modified: 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/template/tempNegate/Begin.jsp
==============================================================================
--- 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/template/tempNegate/Begin.jsp
        (original)
+++ 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/template/tempNegate/Begin.jsp
        Sat Jul 24 11:34:05 2004
@@ -1,19 +1,20 @@
 <%@ taglib uri="beehive-netui-tags-html.tld" prefix="netui" %>
 <%@ taglib uri="beehive-netui-tags-template.tld" prefix="temp" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c"%>
 <netui:html>
 <body>
 <h4><netui:label value="${pageFlow.title}"/></h4>
-<temp:visible visible="${pageFlow.visible}">
+<c:if test="${pageFlow.visible}">
         <p>Text from the Visible Tag - Should See</p>
-</temp:visible>
-<temp:visible visible="${pageFlow.visible}" negate="true">
+</c:if>
+<c:if test="${!pageFlow.visible}">
         <p>Negated Visible Tag - Should Not See</p>
-</temp:visible>
-<temp:visible visible="${pageFlow.notVisible}">
+</c:if>
+<c:if test="${pageFlow.notVisible}">
         <p>Not Visible Tag - Should Not See</p>
-</temp:visible>
-<temp:visible visible="${pageFlow.notVisible}" negate="true">
+</c:if>
+<c:if test="${!pageFlow.notVisible}">
         <p>Negate Not Visible Tag - Should See</p>
-</temp:visible>
+</c:if>
 </body>
 </netui:html>

Modified: 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/template/visible/Template.jsp
==============================================================================
--- 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/template/visible/Template.jsp
        (original)
+++ 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/template/visible/Template.jsp
        Sat Jul 24 11:34:05 2004
@@ -1,6 +1,7 @@
 <%@ page language="java"%>
 <%@ taglib uri="beehive-netui-tags-html.tld" prefix="netui" %>
 <%@ taglib uri="beehive-netui-tags-template.tld" prefix="temp" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c"%>
 <netui:html>
 <head>
 <title><temp:attribute name="title"/></title>
@@ -9,13 +10,13 @@
 <body>
 <h1><temp:attribute name="title"/></h1>
 <table width="100%"><tr>
-<temp:visible visible="${pageFlow.visible}">
+<c:if test="${pageFlow.visible}">
 <td>
 <table width="100%"><tr><td width="100">'left' Section</td><td><hr 
/></td></tr></table>
 <temp:includeSection name="left"/>
 <hr />
 </td>
-</temp:visible>
+</c:if>
 <td>
 <table width="100%"><tr><td width="100">'right' Section</td><td><hr 
/></td></tr></table>
 <temp:includeSection name="right"/>

Modified: 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/template/visibleError/Template.jsp
==============================================================================
--- 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/template/visibleError/Template.jsp
   (original)
+++ 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/template/visibleError/Template.jsp
   Sat Jul 24 11:34:05 2004
@@ -1,6 +1,7 @@
 <%@ page language="java"%>
 <%@ taglib uri="beehive-netui-tags-html.tld" prefix="netui" %>
 <%@ taglib uri="beehive-netui-tags-template.tld" prefix="temp" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c"%>
 <netui:html>
 <head>
 <title><temp:attribute name="title"/></title>
@@ -9,13 +10,13 @@
 <netui:body>
 <h1><temp:attribute name="title"/></h1>
 <table width="100%"><tr>
-<temp:visible visible="${pageFlow.foo}">
+<c:if test="${pageFlow.foo}">
 <td>
 <table width="100%"><tr><td width="100">'left' Section</td><td><hr 
/></td></tr></table>
 <temp:includeSection name="left"/>
 <hr />
 </td>
-</temp:visible>
+</c:if>
 <td>
 <table width="100%"><tr><td width="100">'right' Section</td><td><hr 
/></td></tr></table>
 <temp:includeSection name="right"/>

Modified: 
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
==============================================================================
--- 
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
   (original)
+++ 
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
   Sat Jul 24 11:34:05 2004
@@ -665,19 +665,6 @@
          </features>
       </test>
       <test>
-         <name>B28633</name>
-         <description>Databinding errors in the visible tag</description>
-         <webapp>coreWeb</webapp>
-         <categories>
-            <category>bvt</category>
-            <category>radarBugs</category>
-         </categories>
-         <features>
-            <feature>Visible</feature>
-            <feature>Errors</feature>
-         </features>
-      </test>
-      <test>
          <name>B28774</name>
          <description>Report errors when the template file is not 
found</description>
          <webapp>coreWeb</webapp>

Reply via email to