You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ri...@apache.org on 2004/09/21 22:32:12 UTC

svn commit: rev 46996 - in incubator/beehive/trunk/netui: ant src/compiler/org/apache/beehive/netui/compiler src/compiler/org/apache/beehive/netui/compiler/grammar src/compiler/org/apache/beehive/netui/compiler/model src/tags-html/org/apache/beehive/netui/tags/html src/util/org/apache/beehive/netui/util test/ant test/webapps/drt/coreWeb/validation/defaultMessages test/webapps/drt/testRecorder/config test/webapps/drt/testRecorder/tests

Author: rich
Date: Tue Sep 21 13:32:11 2004
New Revision: 46996

Added:
   incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/validation/defaultMessages/
   incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/validation/defaultMessages/DefaultMessagesController.jpf   (contents, props changed)
   incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/validation/defaultMessages/index.jsp   (contents, props changed)
   incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/validation/defaultMessages/success.jsp   (contents, props changed)
   incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ValidationDefaultMessages.xml   (contents, props changed)
Modified:
   incubator/beehive/trunk/netui/ant/common.properties
   incubator/beehive/trunk/netui/ant/webappTemplate.xml
   incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FlowControllerGenerator.java
   incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/BaseValidationRuleGrammar.java
   incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/StrutsApp.java
   incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Error.java
   incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/ErrorBaseTag.java
   incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Errors.java
   incubator/beehive/trunk/netui/src/util/org/apache/beehive/netui/util/netui.properties
   incubator/beehive/trunk/netui/test/ant/test.properties
   incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
   incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/B36628.xml
Log:
- Fixed the @Jpf.ValidateEmail annotation.  The root problem was missing jakarta-oro.jar in the webapp template.
- Fixed to avoid a 'missing default resources' error in the case where the user is depending on built-in validation error messages for a page flow with no default message resources defined.
- Fixed to avoid error values like '???en_us.MyMissingMessage???' from appearing in pages for missing messages.  A tag error is now reported instead.

DRT: netui (WinXP)
BB: self (linux)



Modified: incubator/beehive/trunk/netui/ant/common.properties
==============================================================================
--- incubator/beehive/trunk/netui/ant/common.properties	(original)
+++ incubator/beehive/trunk/netui/ant/common.properties	Tue Sep 21 13:32:11 2004
@@ -62,6 +62,7 @@
 commons-digester.jar=${struts.dir}/commons-digester.jar
 commons-fileupload.jar=${struts.dir}/commons-fileupload.jar
 commons-validator.jar=${struts.dir}/commons-validator.jar
+jakarta-oro.jar=${struts.dir}/jakarta-oro.jar
 
 commons-el.jar=${build.external.dir}/commons-el/commons-el.jar
 
@@ -165,6 +166,7 @@
 deployed.commons-digester.jar=${webappTemplate.webinf.lib}/commons-digester.jar
 deployed.commons-fileupload.jar=${webappTemplate.webinf.lib}/commons-fileupload.jar
 deployed.commons-validator.jar=${webappTemplate.webinf.lib}/commons-validator.jar
+deployed.jakarta-oro.jar=${webappTemplate.webinf.lib}/jakarta-oro.jar
 
 deployed.commons-el.jar=${webappTemplate.webinf.lib}/commons-el.jar
 

Modified: incubator/beehive/trunk/netui/ant/webappTemplate.xml
==============================================================================
--- incubator/beehive/trunk/netui/ant/webappTemplate.xml	(original)
+++ incubator/beehive/trunk/netui/ant/webappTemplate.xml	Tue Sep 21 13:32:11 2004
@@ -52,6 +52,7 @@
         <copy todir="${webinf.lib}" file="${struts.dir}/commons-collections.jar"/>
         <copy todir="${webinf.lib}" file="${struts.dir}/commons-validator.jar"/>
         <copy todir="${webinf.lib}" file="${struts.dir}/commons-fileupload.jar"/>
+        <copy todir="${webinf.lib}" file="${struts.dir}/jakarta-oro.jar"/>
 
         <!-- copy commons-el.jar -->
         <copy todir="${webinf.lib}" file="${commons-el.jar}"/>
@@ -173,6 +174,7 @@
         <include name="WEB-INF/lib/commons-collections.jar"/>
         <include name="WEB-INF/lib/commons-validator.jar"/>
         <include name="WEB-INF/lib/commons-fileupload.jar"/>
+        <include name="WEB-INF/lib/jakarta-oro.jar"/>
     </patternset>
 
     <target name="deploy.netui.runtime" description="Deploy the NetUI server runtime to a webapp root directory.">

Modified: incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FlowControllerGenerator.java
==============================================================================
--- incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FlowControllerGenerator.java	(original)
+++ incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FlowControllerGenerator.java	Tue Sep 21 13:32:11 2004
@@ -33,8 +33,9 @@
         extends BaseGenerator
 {
     private static long _compilerJarTimestamp = -1;
-    private static final boolean ALWAYS_GENERATE = 
-            System.getProperty( "pageflow.always-generate-struts-config" ) != null;
+    private static final boolean ALWAYS_GENERATE = true;  // TODO: this turns stale checking off.  Do we need it?
+//    private static final boolean ALWAYS_GENERATE = 
+//            System.getProperty( "pageflow.always-generate-struts-config" ) != null;
     private FlowControllerInfo _fcInfo;
     
     

Modified: incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/BaseValidationRuleGrammar.java
==============================================================================
--- incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/BaseValidationRuleGrammar.java	(original)
+++ incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/BaseValidationRuleGrammar.java	Tue Sep 21 13:32:11 2004
@@ -84,7 +84,7 @@
         if ( CompilerUtils.getString( parentAnnotations[0], DISPLAY_NAME_ATTR, true ) == null
              && CompilerUtils.getString( annotation, ARG0_ATTR, true ) == null
              && CompilerUtils.getString( annotation, ARG0_KEY_ATTR, true ) == null
-             && CompilerUtils.getString( annotation, MESSAGE_ATTR, true ) == null
+             && CompilerUtils.getString( annotation, MESSAGE_KEY_ATTR, true ) == null
              && CompilerUtils.getString( annotation, MESSAGE_ATTR, true ) == null )
         {
             addWarning( annotation, "warning.using-default-display-name",

Modified: incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/StrutsApp.java
==============================================================================
--- incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/StrutsApp.java	(original)
+++ incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/StrutsApp.java	Tue Sep 21 13:32:11 2004
@@ -94,7 +94,7 @@
         MessageResourcesModel mrm = new MessageResourcesModel( this );
         mrm.setParameter( DEFAULT_VALIDATION_MESSAGE_BUNDLE );
         mrm.setKey( DEFAULT_VALIDATION_MESSAGE_BUNDLE_KEY );
-        mrm.setReturnNull( false );
+        mrm.setReturnNull( true );
         addMessageResources( mrm );
     }
 

Modified: incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Error.java
==============================================================================
--- incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Error.java	(original)
+++ incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Error.java	Tue Sep 21 13:32:11 2004
@@ -133,7 +133,7 @@
         boolean suffixPresent = false;
         String locale = _locale;
 
-        if (!isMissingDefaultMessages(pageContext))
+        if (!isMissingUserDefaultMessages(pageContext))
         {
             try {
                 // Check for presence of error prefix and suffix message keys

Modified: incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/ErrorBaseTag.java
==============================================================================
--- incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/ErrorBaseTag.java	(original)
+++ incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/ErrorBaseTag.java	Tue Sep 21 13:32:11 2004
@@ -37,6 +37,7 @@
 import javax.servlet.jsp.el.ELException;
 import javax.servlet.http.HttpServletRequest;
 import java.util.Locale;
+import java.util.MissingResourceException;
 
 abstract public class ErrorBaseTag extends AbstractSimpleTag
 {
@@ -162,7 +163,6 @@
         }
         else if (key.startsWith(InternalConstants.MESSAGE_IS_EXPRESSION_PREFIX))
         {
-            // @todo misuse of this api
             String expression = key.substring(InternalConstants.MESSAGE_IS_EXPRESSION_PREFIX_LENGTH);
             Object formBean = pageContext.getAttribute( Constants.BEAN_KEY, PageContext.REQUEST_SCOPE );
             HttpServletRequest request = ( HttpServletRequest ) pageContext.getRequest();
@@ -178,14 +178,10 @@
         }
         else {
             boolean requestedSpecificBundle = (bundle != null);
-            if (bundle == null && isMissingDefaultMessages(pageContext)) {
-                String s = Bundle.getString("Tags_ErrorsBundleMissing", null);
-                registerTagError(s, null);
-                return null;
-            }
-
+            boolean missingUserDefaultMessages = isMissingUserDefaultMessages(pageContext);
+            
             // First look in the default message bundle for the page flow.
-            if (requestedSpecificBundle || ! isMissingDefaultMessages(pageContext))
+            if (requestedSpecificBundle || ! missingUserDefaultMessages)
             {
                 message = RequestUtils.message(pageContext, bundle, _locale, key, messageArgs);
             }
@@ -213,12 +209,37 @@
                 String qualified = getQualifiedBundleName("_defaultValidationMessages");
                 message = RequestUtils.message(pageContext, qualified, _locale, key, messageArgs);
             }
+            
+            //
+            // We've run out of options -- the message simply doesn't exist.  If the user didn't specify a default
+            // message bundle in the page flow, that's the problem; otherwise, it's simply a missing message.
+            // Register a tag error for either case.
+            //
+            if (message == null)
+            {
+                if (! requestedSpecificBundle && missingUserDefaultMessages) {
+                    String s = Bundle.getString("Tags_ErrorsBundleMissing", null);
+                    registerTagError(s, null);
+                    return null;
+                }
+                else
+                {
+                    String s = Bundle.getString("Tags_ErrorsMessageMissing", key);
+                    registerTagError(s, null);
+                    return null;
+                }
+            }
         }
 
         return message;
     }
     
-    protected boolean isMissingDefaultMessages(PageContext pageContext)
+    /**
+     * Tell whether the current page flow has no default message bundle defined.
+     * 
+     * @return <code>true</code> if the current page flow (Struts module) has no user-specified default message bundle.
+     */ 
+    protected static boolean isMissingUserDefaultMessages(PageContext pageContext)
     {
         ModuleConfig mc = RequestUtils.getModuleConfig(pageContext);
 

Modified: incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Errors.java
==============================================================================
--- incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Errors.java	(original)
+++ incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Errors.java	Tue Sep 21 13:32:11 2004
@@ -118,7 +118,7 @@
         boolean suffixPresent = false;
 
         String locale = _locale;
-        if (!isMissingDefaultMessages(pageContext))
+        if (!isMissingUserDefaultMessages(pageContext))
         {
             try {
                 // Check for presence of header and footer message keys

Modified: incubator/beehive/trunk/netui/src/util/org/apache/beehive/netui/util/netui.properties
==============================================================================
--- incubator/beehive/trunk/netui/src/util/org/apache/beehive/netui/util/netui.properties	(original)
+++ incubator/beehive/trunk/netui/src/util/org/apache/beehive/netui/util/netui.properties	Tue Sep 21 13:32:11 2004
@@ -96,7 +96,8 @@
 Tags_formatDate_Type_Error=The type "{0}" may not be formatted by a formatDate tag.
 Tags_LocaleRequiresLanguage=If you set a country, you must also set a language when specifying a local, defaulting to Locale of Request.  The country set was "{0}"
 Tags_ErrorsException=An error occurred accessing the message bundle.  This may be because the message-resource is not defined within the page flow.  The error: {0}
-Tags_ErrorsBundleMissing=An error occurred accessing the message bundle.  This may be because the message-resource is not defined within the page flow.  The error: Cannot find message resources under key org.apache.struts.action.MESSAGE
+Tags_ErrorsBundleMissing=An error occurred accessing the message bundle.  This may be because there is no default message bundle defined for the current page flow.
+Tags_ErrorsMessageMissing=Could not find a message for message key "{0}" in the default message bundle for the current page flow.
 Tags_ParameterRenderError=The parameter type [{0}] was not recognized as a valid type.
 Tags_ParameterAccessError=The parameter type [{0}] was not recognized as a valid type, attempting to access argument ''{1}''.
 Tags_DataSourceExpressionError=An error occurred converting the data source "{0}" into an expression; {1}

Modified: incubator/beehive/trunk/netui/test/ant/test.properties
==============================================================================
--- incubator/beehive/trunk/netui/test/ant/test.properties	(original)
+++ incubator/beehive/trunk/netui/test/ant/test.properties	Tue Sep 21 13:32:11 2004
@@ -53,6 +53,7 @@
 ${deployed.commons-beanutils.jar};\
 ${deployed.commons-collections.jar};\
 ${deployed.commons-validator.jar};\
+${deployed.jakarta-oro.jar};\
 ${deployed.tags.databinding.jar};\
 ${deployed.tags.datagrid.jar};\
 ${deployed.tags.html.jar};\

Added: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/validation/defaultMessages/DefaultMessagesController.jpf
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/validation/defaultMessages/DefaultMessagesController.jpf	Tue Sep 21 13:32:11 2004
@@ -0,0 +1,214 @@
+package validation.defaultMessages;
+
+import javax.servlet.http.HttpSession;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+import javax.servlet.http.HttpServletRequest;
+import org.apache.struts.action.ActionMapping;
+import org.apache.beehive.netui.pageflow.FormData;
+
+/**
+ * This is the default controller for a blank web application.
+ */
+@Jpf.Controller
+public class DefaultMessagesController extends PageFlowController
+{
+    @Jpf.Action(forwards = {
+        @Jpf.Forward(name = "success",
+                     path = "index.jsp")
+    })
+    protected Forward begin()
+    {
+        return new Forward("success");
+    }
+
+
+    /**
+     * Callback that is invoked when this controller instance is created.
+     */
+    protected void onCreate()
+    {
+    }
+
+    /**
+     * Callback that is invoked when this controller instance is destroyed.
+     */
+    protected void onDestroy(HttpSession session)
+    {
+    }
+
+
+    @Jpf.Action(forwards = {
+        @Jpf.Forward(name = "success",
+                     path = "success.jsp")
+    },
+        validationErrorForward=@Jpf.Forward(name="fail", navigateTo=Jpf.NavigateTo.currentPage)
+    )
+    protected Forward validate(TheForm form)
+    {
+        Forward forward = new Forward("success");
+        return forward;
+    }
+
+
+    public static class TheForm extends FormData
+    {
+        private String _required;
+        private String _minlength;
+        private String _maxlength;
+        private String _byte;
+        private String _short;
+        private String _int;
+        private String _float;
+        private String _long;
+        private String _double;
+        private String _date;
+        private String _range;
+        private String _creditcard;
+        private String _email;
+
+        @Jpf.ValidatableProperty(displayName="This field", validateRequired = @Jpf.ValidateRequired())
+        public String getRequired()
+        {
+            return _required;
+        }
+
+        public void setRequired( String required )
+        {
+            _required = required;
+        }
+
+        @Jpf.ValidatableProperty(displayName="This field",validateMinLength = @Jpf.ValidateMinLength(chars=2))
+        public String getMinlength()
+        {
+            return _minlength;
+        }
+
+        public void setMinlength( String minlength )
+        {
+            _minlength = minlength;
+        }
+
+        @Jpf.ValidatableProperty(displayName="This field",validateMaxLength = @Jpf.ValidateMaxLength(chars=2))
+        public String getMaxlength()
+        {
+            return _maxlength;
+        }
+
+        public void setMaxlength( String maxlength )
+        {
+            _maxlength = maxlength;
+        }
+
+        @Jpf.ValidatableProperty(displayName="This field",validateType = @Jpf.ValidateType(type=byte.class))
+        public String getByte()
+        {
+            return _byte;
+        }
+
+        public void setByte( String aByte )
+        {
+            _byte = aByte;
+        }
+
+        @Jpf.ValidatableProperty(displayName="This field",validateType = @Jpf.ValidateType(type=short.class))
+        public String getShort()
+        {
+            return _short;
+        }
+
+        public void setShort( String aShort )
+        {
+            _short = aShort;
+        }
+
+        @Jpf.ValidatableProperty(displayName="This field",validateType = @Jpf.ValidateType(type=int.class))
+        public String getInt()
+        {
+            return _int;
+        }
+
+        public void setInt( String anInt )
+        {
+            _int = anInt;
+        }
+
+        @Jpf.ValidatableProperty(displayName="This field",validateType = @Jpf.ValidateType(type=float.class))
+        public String getFloat()
+        {
+            return _float;
+        }
+
+        public void setFloat( String aFloat )
+        {
+            _float = aFloat;
+        }
+
+        @Jpf.ValidatableProperty(displayName="This field",validateType = @Jpf.ValidateType(type=long.class))
+        public String getLong()
+        {
+            return _long;
+        }
+
+        public void setLong( String aLong )
+        {
+            _long = aLong;
+        }
+
+        @Jpf.ValidatableProperty(displayName="This field",validateType = @Jpf.ValidateType(type=double.class))
+        public String getDouble()
+        {
+            return _double;
+        }
+
+        public void setDouble( String aDouble )
+        {
+            _double = aDouble;
+        }
+
+        @Jpf.ValidatableProperty(displayName="This field",validateDate = @Jpf.ValidateDate(pattern="MM/dd/yyyy"))
+        public String getDate()
+        {
+            return _date;
+        }
+
+        public void setDate( String date )
+        {
+            _date = date;
+        }
+
+        @Jpf.ValidatableProperty(displayName="This field",validateRange = @Jpf.ValidateRange(minInt=5, maxInt=10))
+        public String getRange()
+        {
+            return _range;
+        }
+
+        public void setRange( String range )
+        {
+            _range = range;
+        }
+
+        @Jpf.ValidatableProperty(displayName="This field",validateCreditCard = @Jpf.ValidateCreditCard())
+        public String getCreditcard()
+        {
+            return _creditcard;
+        }
+
+        public void setCreditcard( String creditcard )
+        {
+            _creditcard = creditcard;
+        }
+
+        @Jpf.ValidatableProperty(displayName="This field",validateEmail = @Jpf.ValidateEmail())
+        public String getEmail()
+        {
+            return _email;
+        }
+
+        public void setEmail( String email )
+        {
+            _email = email;
+        }
+    }
+}

Added: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/validation/defaultMessages/index.jsp
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/validation/defaultMessages/index.jsp	Tue Sep 21 13:32:11 2004
@@ -0,0 +1,116 @@
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ taglib prefix="netui" uri="http://beehive.apache.org/netui/tags-html-1.0"%>
+<%@ taglib prefix="netui-data" uri="http://beehive.apache.org/netui/tags-databinding-1.0"%>
+<%@ taglib prefix="netui-template" uri="http://beehive.apache.org/netui/tags-template-1.0"%>
+
+
+<netui:html>
+    <head>
+        <netui:base/>
+    </head>
+    <netui:body>
+    
+        <h3>Validation - Default Messages</h3>
+
+        <netui:form action="validate">
+
+            <table>
+                <tr valign="top">
+                    <td>required:</td>
+                    <td>
+                    <netui:textBox dataSource="actionForm.required"/>
+                        <netui:error value="required"/>
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>minlength:</td>
+                    <td>
+                    <netui:textBox dataSource="actionForm.minlength"/>
+                        <netui:error value="minlength"/>
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>maxlength:</td>
+                    <td>
+                    <netui:textBox dataSource="actionForm.maxlength"/>
+                        <netui:error value="maxlength"/>
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>byte:</td>
+                    <td>
+                    <netui:textBox dataSource="actionForm.byte"/>
+                        <netui:error value="byte"/>
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>short:</td>
+                    <td>
+                    <netui:textBox dataSource="actionForm.short"/>
+                        <netui:error value="short"/>
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>int:</td>
+                    <td>
+                    <netui:textBox dataSource="actionForm.int"/>
+                        <netui:error value="int"/>
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>float:</td>
+                    <td>
+                    <netui:textBox dataSource="actionForm.float"/>
+                        <netui:error value="float"/>
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>long:</td>
+                    <td>
+                    <netui:textBox dataSource="actionForm.long"/>
+                        <netui:error value="long"/>
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>double:</td>
+                    <td>
+                    <netui:textBox dataSource="actionForm.double"/>
+                        <netui:error value="double"/>
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>date:</td>
+                    <td>
+                    <netui:textBox dataSource="actionForm.date"/>
+                        <netui:error value="date"/>
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>range:</td>
+                    <td>
+                    <netui:textBox dataSource="actionForm.range"/>
+                        <netui:error value="range"/>
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>creditcard:</td>
+                    <td>
+                    <netui:textBox dataSource="actionForm.creditcard"/>
+                        <netui:error value="creditcard"/>
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>email:</td>
+                    <td>
+                    <netui:textBox dataSource="actionForm.email"/>
+                        <netui:error value="email"/>
+                    </td>
+                </tr>
+            </table>
+            
+            <netui:button value="submit"/>
+        </netui:form>
+    </netui:body>
+</netui:html>
+
+  

Added: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/validation/defaultMessages/success.jsp
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/validation/defaultMessages/success.jsp	Tue Sep 21 13:32:11 2004
@@ -0,0 +1,19 @@
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ taglib prefix="netui" uri="http://beehive.apache.org/netui/tags-html-1.0"%>
+<%@ taglib prefix="netui-data" uri="http://beehive.apache.org/netui/tags-databinding-1.0"%>
+<%@ taglib prefix="netui-template" uri="http://beehive.apache.org/netui/tags-template-1.0"%>
+
+
+<netui:html>
+    <head>
+        <netui:base/>
+    </head>
+    <netui:body>
+    
+
+
+        <netui:anchor action="begin">start over</netui:anchor>
+    </netui:body>
+</netui:html>
+
+  
\ No newline at end of file

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	Tue Sep 21 13:32:11 2004
@@ -5144,6 +5144,19 @@
          </features>
       </test>
       <test>
+         <name>ValidationDefaultMessages</name>
+         <description>Test of default (built-in) validation messages, which are accessible even when the user has not specified a default message bundle in the page flow.</description>
+         <webapp>coreWeb</webapp>
+         <categories>
+            <category>bvt</category>
+            <category>corePageFlow</category>
+         </categories>
+         <features>
+            <feature>Form</feature>
+            <feature>Validation</feature>
+         </features>
+      </test>
+      <test>
          <name>Visible</name>
          <description>Test of using the Visible tag in a template</description>
          <webapp>coreWeb</webapp>

Modified: incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/B36628.xml
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/B36628.xml	(original)
+++ incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/B36628.xml	Tue Sep 21 13:32:11 2004
@@ -203,7 +203,7 @@
     <div> <hr /><table border="1" cellspacing="0" style="color:red;background-color:white">
  <tr><th colspan="6">Page Errors</th></tr>
  <tr><th>Error Number</th><th>Tag Type</th><th colspan="4">Error</th></tr>
-<tr><th>1</th><th>Errors</th><th>Message</th><td>An error occurred accessing the message bundle.  This may be because the message-resource is not defined within the page flow.  The error: Cannot find message resources under key org.apache.struts.action.MESSAGE</td></tr>
+<tr><th>1</th><th>Errors</th><th>Message</th><td>An error occurred accessing the message bundle.  This may be because there is no default message bundle defined for the current page flow.</td></tr>
 </table></div>
 </body>
 </html>]]></responseBody>
@@ -410,7 +410,7 @@
      <div> <hr /><table border="1" cellspacing="0" style="color:red;background-color:white">
  <tr><th colspan="6">Page Errors</th></tr>
  <tr><th>Error Number</th><th>Tag Type</th><th colspan="4">Error</th></tr>
-<tr><th>1</th><th>Error</th><th>Message</th><td>An error occurred accessing the message bundle.  This may be because the message-resource is not defined within the page flow.  The error: Cannot find message resources under key org.apache.struts.action.MESSAGE</td></tr>
+<tr><th>1</th><th>Error</th><th>Message</th><td>An error occurred accessing the message bundle.  This may be because there is no default message bundle defined for the current page flow.</td></tr>
 </table></div>
 </body>
 </html>]]></responseBody>
@@ -531,4 +531,4 @@
   <testCount>5</testCount>
   <passedCount>0</passedCount>
   <failedCount>5</failedCount>
-</recorderSession>
\ No newline at end of file
+</recorderSession>

Added: incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ValidationDefaultMessages.xml
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ValidationDefaultMessages.xml	Tue Sep 21 13:32:11 2004
@@ -0,0 +1,429 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ses:recorderSession xmlns:ses="http://beehive.apache.org/netui/tools/testrecorder/2004/session">
+   <ses:sessionName>ValidationDefaultMessages</ses:sessionName>
+   <ses:tester>rich</ses:tester>
+   <ses:startDate>21 Sep 2004, 02:10:17.437 PM MDT</ses:startDate>
+   <ses:description>Test of default (built-in) validation messages, which are accessible even when the user has not specified a default message bundle in the page flow.</ses:description>
+   <ses:tests>
+      <ses:test>
+         <ses:testNumber>1</ses:testNumber>
+         <ses:request>
+            <ses:protocol>HTTP</ses:protocol>
+            <ses:protocolVersion>1.1</ses:protocolVersion>
+            <ses:host>localhost</ses:host>
+            <ses:port>8080</ses:port>
+            <ses:uri>/coreWeb/validation/defaultMessages/DefaultMessagesController.jpf</ses:uri>
+            <ses:method>GET</ses:method>
+            <ses:parameters/>
+            <ses:cookies>
+               <ses:cookie>
+                  <ses:name>JSESSIONID</ses:name>
+                  <ses:value>64FD8E9BCEDCA9891698CAD141BF98AE</ses:value>
+               </ses:cookie>
+            </ses:cookies>
+            <ses:headers>
+               <ses:header>
+                  <ses:name>accept</ses:name>
+                  <ses:value>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>accept-charset</ses:name>
+                  <ses:value>ISO-8859-1,utf-8;q=0.7,*;q=0.7</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>accept-encoding</ses:name>
+                  <ses:value>gzip,deflate</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>accept-language</ses:name>
+                  <ses:value>en-us,en;q=0.5</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>connection</ses:name>
+                  <ses:value>keep-alive</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>cookie</ses:name>
+                  <ses:value>JSESSIONID=64FD8E9BCEDCA9891698CAD141BF98AE</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>host</ses:name>
+                  <ses:value>localhost:8080</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>keep-alive</ses:name>
+                  <ses:value>300</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>user-agent</ses:name>
+                  <ses:value>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3</ses:value>
+               </ses:header>
+            </ses:headers>
+         </ses:request>
+         <ses:response>
+            <ses:statusCode>200</ses:statusCode>
+            <ses:reason/>
+            <ses:responseBody><![CDATA[<!DOCTYPE HTML PUBLIC "//W3C//DTD HTML 4.01 Transitional//EN"
+	"http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+        <base href="http://localhost:8080/coreWeb/validation/defaultMessages/index.jsp">
+    </head>
+    <body>
+    
+        <h3>Validation - Default Messages</h3>
+
+        <form name="theForm" action="/coreWeb/validation/defaultMessages/validate.do" method="post">
+
+            <table>
+                <tr valign="top">
+                    <td>required:</td>
+                    <td>
+                    <input type="text" name="{actionForm.required}">
+                        
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>minlength:</td>
+                    <td>
+                    <input type="text" name="{actionForm.minlength}">
+                        
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>maxlength:</td>
+                    <td>
+                    <input type="text" name="{actionForm.maxlength}">
+                        
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>byte:</td>
+                    <td>
+                    <input type="text" name="{actionForm.byte}">
+                        
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>short:</td>
+                    <td>
+                    <input type="text" name="{actionForm.short}">
+                        
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>int:</td>
+                    <td>
+                    <input type="text" name="{actionForm.int}">
+                        
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>float:</td>
+                    <td>
+                    <input type="text" name="{actionForm.float}">
+                        
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>long:</td>
+                    <td>
+                    <input type="text" name="{actionForm.long}">
+                        
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>double:</td>
+                    <td>
+                    <input type="text" name="{actionForm.double}">
+                        
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>date:</td>
+                    <td>
+                    <input type="text" name="{actionForm.date}">
+                        
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>range:</td>
+                    <td>
+                    <input type="text" name="{actionForm.range}">
+                        
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>creditcard:</td>
+                    <td>
+                    <input type="text" name="{actionForm.creditcard}">
+                        
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>email:</td>
+                    <td>
+                    <input type="text" name="{actionForm.email}">
+                        
+                    </td>
+                </tr>
+            </table>
+            
+            <input type="submit" value="submit">
+        </form>
+    </body>
+</html>]]></ses:responseBody>
+         </ses:response>
+      </ses:test>
+      <ses:test>
+         <ses:testNumber>2</ses:testNumber>
+         <ses:request>
+            <ses:protocol>HTTP</ses:protocol>
+            <ses:protocolVersion>1.1</ses:protocolVersion>
+            <ses:host>localhost</ses:host>
+            <ses:port>8080</ses:port>
+            <ses:uri>/coreWeb/validation/defaultMessages/validate.do</ses:uri>
+            <ses:method>POST</ses:method>
+            <ses:parameters>
+               <ses:parameter>
+                  <ses:name>{actionForm.byte}</ses:name>
+                  <ses:value>x</ses:value>
+               </ses:parameter>
+               <ses:parameter>
+                  <ses:name>{actionForm.creditcard}</ses:name>
+                  <ses:value>x</ses:value>
+               </ses:parameter>
+               <ses:parameter>
+                  <ses:name>{actionForm.date}</ses:name>
+                  <ses:value>x</ses:value>
+               </ses:parameter>
+               <ses:parameter>
+                  <ses:name>{actionForm.double}</ses:name>
+                  <ses:value>x</ses:value>
+               </ses:parameter>
+               <ses:parameter>
+                  <ses:name>{actionForm.email}</ses:name>
+                  <ses:value>x.</ses:value>
+               </ses:parameter>
+               <ses:parameter>
+                  <ses:name>{actionForm.float}</ses:name>
+                  <ses:value>x</ses:value>
+               </ses:parameter>
+               <ses:parameter>
+                  <ses:name>{actionForm.int}</ses:name>
+                  <ses:value>x</ses:value>
+               </ses:parameter>
+               <ses:parameter>
+                  <ses:name>{actionForm.long}</ses:name>
+                  <ses:value>x</ses:value>
+               </ses:parameter>
+               <ses:parameter>
+                  <ses:name>{actionForm.maxlength}</ses:name>
+                  <ses:value>xxx</ses:value>
+               </ses:parameter>
+               <ses:parameter>
+                  <ses:name>{actionForm.minlength}</ses:name>
+                  <ses:value>x</ses:value>
+               </ses:parameter>
+               <ses:parameter>
+                  <ses:name>{actionForm.range}</ses:name>
+                  <ses:value>1</ses:value>
+               </ses:parameter>
+               <ses:parameter>
+                  <ses:name>{actionForm.required}</ses:name>
+                  <ses:value/>
+               </ses:parameter>
+               <ses:parameter>
+                  <ses:name>{actionForm.short}</ses:name>
+                  <ses:value>x</ses:value>
+               </ses:parameter>
+            </ses:parameters>
+            <ses:cookies>
+               <ses:cookie>
+                  <ses:name>JSESSIONID</ses:name>
+                  <ses:value>64FD8E9BCEDCA9891698CAD141BF98AE</ses:value>
+               </ses:cookie>
+            </ses:cookies>
+            <ses:headers>
+               <ses:header>
+                  <ses:name>accept</ses:name>
+                  <ses:value>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>accept-charset</ses:name>
+                  <ses:value>ISO-8859-1,utf-8;q=0.7,*;q=0.7</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>accept-encoding</ses:name>
+                  <ses:value>gzip,deflate</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>accept-language</ses:name>
+                  <ses:value>en-us,en;q=0.5</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>connection</ses:name>
+                  <ses:value>keep-alive</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>content-length</ses:name>
+                  <ses:value>338</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>content-type</ses:name>
+                  <ses:value>application/x-www-form-urlencoded</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>cookie</ses:name>
+                  <ses:value>JSESSIONID=64FD8E9BCEDCA9891698CAD141BF98AE</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>host</ses:name>
+                  <ses:value>localhost:8080</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>keep-alive</ses:name>
+                  <ses:value>300</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>referer</ses:name>
+                  <ses:value>http://localhost:8080/coreWeb/validation/defaultMessages/DefaultMessagesController.jpf</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>user-agent</ses:name>
+                  <ses:value>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3</ses:value>
+               </ses:header>
+            </ses:headers>
+         </ses:request>
+         <ses:response>
+            <ses:statusCode>200</ses:statusCode>
+            <ses:reason/>
+            <ses:responseBody><![CDATA[<!DOCTYPE HTML PUBLIC "//W3C//DTD HTML 4.01 Transitional//EN"
+	"http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+        <base href="http://localhost:8080/coreWeb/validation/defaultMessages/index.jsp">
+    </head>
+    <body>
+    
+        <h3>Validation - Default Messages</h3>
+
+        <form name="theForm" action="/coreWeb/validation/defaultMessages/validate.do" method="post">
+
+            <table>
+                <tr valign="top">
+                    <td>required:</td>
+                    <td>
+                    <input type="text" name="{actionForm.required}">
+                        This field is required.
+
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>minlength:</td>
+                    <td>
+                    <input type="text" name="{actionForm.minlength}" value="x">
+                        This field cannot be less than 2 characters.
+
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>maxlength:</td>
+                    <td>
+                    <input type="text" name="{actionForm.maxlength}" value="xxx">
+                        This field cannot be greater than 2 characters.
+
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>byte:</td>
+                    <td>
+                    <input type="text" name="{actionForm.byte}" value="x">
+                        This field must be a byte.
+
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>short:</td>
+                    <td>
+                    <input type="text" name="{actionForm.short}" value="x">
+                        This field must be a short.
+
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>int:</td>
+                    <td>
+                    <input type="text" name="{actionForm.int}" value="x">
+                        This field must be an integer.
+
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>float:</td>
+                    <td>
+                    <input type="text" name="{actionForm.float}" value="x">
+                        This field must be a float.
+
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>long:</td>
+                    <td>
+                    <input type="text" name="{actionForm.long}" value="x">
+                        This field must be a long.
+
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>double:</td>
+                    <td>
+                    <input type="text" name="{actionForm.double}" value="x">
+                        This field must be a double.
+
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>date:</td>
+                    <td>
+                    <input type="text" name="{actionForm.date}" value="x">
+                        This field is not a date.
+
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>range:</td>
+                    <td>
+                    <input type="text" name="{actionForm.range}" value="1">
+                        This field is not in the range 5 through 10.
+
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>creditcard:</td>
+                    <td>
+                    <input type="text" name="{actionForm.creditcard}" value="x">
+                        This field is an invalid credit card number.
+
+                    </td>
+                </tr>
+                <tr valign="top">
+                    <td>email:</td>
+                    <td>
+                    <input type="text" name="{actionForm.email}" value="x.">
+                        This field is an invalid e-mail address.
+
+                    </td>
+                </tr>
+            </table>
+            
+            <input type="submit" value="submit">
+        </form>
+    </body>
+</html>]]></ses:responseBody>
+         </ses:response>
+      </ses:test>
+   </ses:tests>
+   <ses:endDate>21 Sep 2004, 02:10:58.336 PM MDT</ses:endDate>
+   <ses:testCount>2</ses:testCount>
+</ses:recorderSession>