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 2005/02/19 23:13:34 UTC

svn commit: r154456 - in incubator/beehive/trunk/netui: src/compiler/org/apache/beehive/netui/compiler/ src/compiler/org/apache/beehive/netui/compiler/model/ src/pageflow/org/apache/beehive/netui/pageflow/ src/pageflow/org/apache/beehive/netui/pageflow/internal/ src/tags-html/org/apache/beehive/netui/tags/html/ test/webapps/drt/coreWeb/WEB-INF/src/miniTests/sharedFlowMessageKeys/ test/webapps/drt/coreWeb/miniTests/sharedFlowMessageKeys/ test/webapps/drt/coreWeb/validation/argExpressions/ test/webapps/drt/testRecorder/config/ test/webapps/drt/testRecorder/tests/

Author: rich
Date: Sat Feb 19 14:13:29 2005
New Revision: 154456

URL: http://svn.apache.org/viewcvs?view=rev&rev=154456
Log:
Fixes for:
    - http://issues.apache.org/jira/browse/BEEHIVE-72 : Webapp build warning
    - http://issues.apache.org/jira/browse/BEEHIVE-165 : Actions in SharedFlows located next to global.app do not seem to work
    - http://issues.apache.org/jira/browse/BEEHIVE-172 : SharedFlows are not able to use Message Bundles in exception handlers
    - http://issues.apache.org/jira/browse/BEEHIVE-315 : Databinding expressions not evalutated for error message args

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


Added:
    incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/src/miniTests/sharedFlowMessageKeys/
    incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/src/miniTests/sharedFlowMessageKeys/PageFlowMessages.properties   (with props)
    incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/src/miniTests/sharedFlowMessageKeys/SharedFlowMessages.properties   (with props)
    incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/sharedFlowMessageKeys/
    incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/sharedFlowMessageKeys/Controller.jpf   (with props)
    incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/sharedFlowMessageKeys/SharedFlow.jpfs   (with props)
    incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/sharedFlowMessageKeys/index.jsp   (with props)
    incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/validation/argExpressions/
    incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/validation/argExpressions/Controller.jpf   (with props)
    incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/validation/argExpressions/index.jsp   (with props)
    incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/SharedFlowMessageKeys.xml   (with props)
    incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ValidationArgExpressions.xml   (with props)
Modified:
    incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FlowControllerChecker.java
    incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/PageFlowChecker.java
    incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/SharedFlowChecker.java
    incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/diagnostics.properties
    incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/ExceptionModel.java
    incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/ExpressionMessage.java
    incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowController.java
    incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/GlobalApp.java
    incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowRequestProcessor.java
    incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/DefaultExceptionsHandler.java
    incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/InternalUtils.java
    incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/ErrorBaseTag.java
    incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml

Modified: incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FlowControllerChecker.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FlowControllerChecker.java?view=diff&r1=154455&r2=154456
==============================================================================
--- incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FlowControllerChecker.java (original)
+++ incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FlowControllerChecker.java Sat Feb 19 14:13:29 2005
@@ -26,16 +26,18 @@
 import com.sun.mirror.declaration.*;
 import com.sun.mirror.apt.AnnotationProcessorEnvironment;
 import com.sun.mirror.type.TypeMirror;
-import com.sun.mirror.type.DeclaredType;
 import com.sun.mirror.type.ClassType;
 
 import java.io.File;
 import java.io.IOException;
+import java.io.FilenameFilter;
 import java.util.Collection;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Map;
 import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
 
 import static org.apache.beehive.netui.compiler.JpfLanguageConstants.*;
 
@@ -476,5 +478,95 @@
     protected FlowControllerInfo getFlowControllerInfo()
     {
         return _fcInfo;
+    }
+    
+    protected void checkForOverlappingClasses( ClassDeclaration jpfClass, String baseClass, String fileExtension,
+                                               String errorKey )
+    {
+        File jpfFile = CompilerUtils.getSourceFile( jpfClass, true );
+        File parentDir = jpfFile.getParentFile();
+        PackageDeclaration pkg = jpfClass.getPackage();
+        Collection< ClassDeclaration > packageClasses = pkg.getClasses();
+        Set< String > overlapping = new HashSet< String >();
+        List< File > overlappingFiles = new ArrayList< File >();
+        
+        //
+        // First go through the other classes in this package to look for other classes of this type.  Only one per
+        // directory is allowed.
+        //
+        for ( ClassDeclaration classDecl : packageClasses )
+        {
+            if ( CompilerUtils.getAnnotation( classDecl, CONTROLLER_TAG_NAME ) != null
+                 && CompilerUtils.isAssignableFrom( baseClass, classDecl, getEnv() ) )
+            {
+                File file = CompilerUtils.getSourceFile( classDecl, false );
+                
+                //
+                // Add the dependency if it's a different file and if the file exists (it may have been deleted
+                // sometime after the list of classes in this package got built.
+                //
+                if ( ! jpfFile.equals( file ) && file != null && file.exists() )
+                {
+                    overlapping.add( file.getName() );
+                    overlappingFiles.add( file );
+                }
+            }
+        }
+        
+        //
+        // Additionally, we'll go through the parent directory to make sure there are no other files of this type. 
+        // This is a double-check for the case where duplicate files have the same class names inside them, which means
+        // that iterating through the list of package classes is hit or miss (only one of them will show up, and it may
+        // be this class or the duplicate class).
+        //
+        File[] peers = parentDir.listFiles( new ExtensionFileFilter( fileExtension ) );
+        
+        if ( peers != null )    // make sure the directory hasn't been deleted while we're running
+        {
+            for ( int i = 0; i < peers.length; i++ )
+            {
+                File peer = peers[i];
+                if ( ! peer.equals( jpfFile ) )
+                {
+                    String name = peer.getName();
+                    
+                    if ( ! overlapping.contains( name ) )
+                    {
+                        overlapping.add( name );
+                        overlappingFiles.add( peer );
+                    }
+                }
+            }
+        }
+        
+        int len = overlapping.size();
+        if ( len > 0 )
+        {
+            if ( len > 3 )
+            {
+                getDiagnostics().addError( jpfClass, errorKey, overlapping.toArray() );
+            }
+            else
+            {
+                getDiagnostics().addError( jpfClass, errorKey + len, overlapping.toArray() );
+            }
+        }
+        
+        getCheckResultMap().put( JpfLanguageConstants.ExtraInfoKeys.overlappingPageFlowFiles, overlappingFiles ); 
+    }
+    
+    private static class ExtensionFileFilter implements FilenameFilter
+    {
+        private String _extension;
+        
+        public ExtensionFileFilter( String extension )
+        {
+            _extension = extension;
+        }
+        
+        public boolean accept( File dir, String name )
+        {
+            return name.endsWith( _extension );
+        }
     }
 }

Modified: incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/PageFlowChecker.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/PageFlowChecker.java?view=diff&r1=154455&r2=154456
==============================================================================
--- incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/PageFlowChecker.java (original)
+++ incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/PageFlowChecker.java Sat Feb 19 14:13:29 2005
@@ -50,22 +50,11 @@
 public class PageFlowChecker
         extends FlowControllerChecker
 {
-    private static final FilenameFilter JPF_FILE_FILTER = new JpfFileFilter();
-    
-    
     public PageFlowChecker( AnnotationProcessorEnvironment env, Diagnostics diagnostics, FlowControllerInfo fcInfo )    
     {
         super( env, diagnostics, fcInfo );
     }
 
-    private static class JpfFileFilter implements FilenameFilter
-    {
-        public boolean accept( File dir, String name )
-        {
-            return name.endsWith( JPF_FILE_EXTENSION_DOT );
-        }
-    }
-    
     public BaseGenerator getGenerator()
     {
         return new PageFlowGenerator( getEnv(), getFlowControllerInfo() );
@@ -123,75 +112,13 @@
 
     protected void doAdditionalClassChecks( ClassDeclaration jpfClass, File webappRoot )
     {
-        File jpfFile = CompilerUtils.getSourceFile( jpfClass, true );
-        PackageDeclaration pkg = jpfClass.getPackage();
-        Collection< ClassDeclaration > packageClasses = pkg.getClasses();
-        Set< String > overlapping = new HashSet< String >();
-        List< File > overlappingFiles = new ArrayList< File >();
+        // Make sure there are no other page flows in this package/directory.
+        checkForOverlappingClasses( jpfClass, JPF_BASE_CLASS, JPF_FILE_EXTENSION_DOT, "error.overlapping-pageflows" );
         
-        //
-        // First go through the other classes in this package to look for other page flows.
-        //
-        for ( ClassDeclaration classDecl : packageClasses )
-        {
-            if ( CompilerUtils.isPageFlowClass( classDecl, getEnv() ) )
-            {
-                File file = CompilerUtils.getSourceFile( classDecl, false );
-                
-                //
-                // Add the dependency if it's a different file and if the file exists (it may have been deleted
-                // sometime after the list of classes in this package got built.
-                //
-                if ( ! jpfFile.equals( file ) && file != null && file.exists() )
-                {
-                    overlapping.add( file.getName() );
-                    overlappingFiles.add( file );
-                }
-            }
-        }
-            
-        //
-        // Additionally, we'll go through the parent directory to make sure there are no other .jpf files.  This is
-        // a double-check for the case where duplicate files have the same class names inside them, which means that
-        // iterating through the list of package classes is hit or miss (only one of them will show up, and it may be
-        // this class or the duplicate class).
-        //
+        PackageDeclaration pkg = jpfClass.getPackage();
+        File jpfFile = CompilerUtils.getSourceFile( jpfClass, true );
         File parentDir = jpfFile.getParentFile();
-        File[] peers = parentDir.listFiles( JPF_FILE_FILTER );
-        
-        if ( peers != null )    // make sure the directory hasn't been deleted while we're running
-        {
-            for ( int i = 0; i < peers.length; i++ )
-            {
-                File peer = peers[i];
-                if ( ! peer.equals( jpfFile ) )
-                {
-                    String name = peer.getName();
-                    
-                    if ( ! overlapping.contains( name ) )
-                    {
-                        overlapping.add( name );
-                        overlappingFiles.add( peer );
-                    }
-                }
-            }
-        }
-
-        int len = overlapping.size();
-        if ( len > 0 )
-        {
-            if ( len > 3 )
-            {
-                getDiagnostics().addError( jpfClass, "error.overlapping-pageflows", overlapping.toArray() );
-            }
-            else
-            {
-                getDiagnostics().addError( jpfClass, "error.overlapping-pageflows" + len, overlapping.toArray() );
-            }
-        }
         
-        getCheckResultMap().put( JpfLanguageConstants.ExtraInfoKeys.overlappingPageFlowFiles, overlappingFiles );
-
         //
         // Check the package name.
         //

Modified: incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/SharedFlowChecker.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/SharedFlowChecker.java?view=diff&r1=154455&r2=154456
==============================================================================
--- incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/SharedFlowChecker.java (original)
+++ incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/SharedFlowChecker.java Sat Feb 19 14:13:29 2005
@@ -45,6 +45,10 @@
 
     protected void doAdditionalClassChecks( ClassDeclaration jclass, File webappRoot )
     {
+        // Make sure there are no other shared flows in this package/directory.
+        checkForOverlappingClasses( jclass, SHARED_FLOW_BASE_CLASS, SHARED_FLOW_FILE_EXTENSION_DOT,
+                                    "error.overlapping-sharedflows" );
+        
         String pkg = jclass.getPackage().getQualifiedName();              
         
         //

Modified: incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/diagnostics.properties
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/diagnostics.properties?view=diff&r1=154455&r2=154456
==============================================================================
--- incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/diagnostics.properties (original)
+++ incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/diagnostics.properties Sat Feb 19 14:13:29 2005
@@ -51,17 +51,24 @@
 error.duplicate-attr2 = Duplicate {0} tag on method {3} (referenced from {4}) with {1}="{2}".
 warning.nonserializable-member-data = Member data should be Serializable or transient.
 error.incompatible-exception-handler = Method {0} cannot handle type {1}.
+
 error.overlapping-pageflows = \
 There are other page flows in this directory ({0}, {1}, {2}, ...).  There may only be one PageFlowController per directory.
-
 error.overlapping-pageflows3 =\
 There are other page flows in this directory ({0}, {1}, {2}).  There may only be one PageFlowController per directory.
-
 error.overlapping-pageflows2 = \
 There are other page flows in this directory ({0}, {1}).  There may only be one PageFlowController per directory.
-
 error.overlapping-pageflows1 = \
 There is another page flow in this directory ({0}).  There may only be one PageFlowController per directory.
+
+error.overlapping-sharedflows = \
+There are other shared flows in this directory ({0}, {1}, {2}, ...).  There may only be one SharedFlowController per directory.
+error.overlapping-sharedflows3 =\
+There are other shared flows in this directory ({0}, {1}, {2}).  There may only be one SharedFlowController per directory.
+error.overlapping-sharedflows2 = \
+There are other shared flows in this directory ({0}, {1}).  There may only be one SharedFlowController per directory.
+error.overlapping-sharedflows1 = \
+There is another shared flow in this directory ({0}).  There may only be one SharedFlowController per directory.
 
 error.unresolved-field = Field {0} does not exist.
 error.wrong-field-type = Field {0} must be of a type derived from {1}.

Modified: incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/ExceptionModel.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/ExceptionModel.java?view=diff&r1=154455&r2=154456
==============================================================================
--- incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/ExceptionModel.java (original)
+++ incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/ExceptionModel.java Sat Feb 19 14:13:29 2005
@@ -19,6 +19,7 @@
 
 import org.apache.beehive.netui.compiler.model.schema.struts11.SetPropertyDocument.SetProperty;
 import org.apache.beehive.netui.compiler.model.schema.struts11.ExceptionDocument;
+import org.apache.beehive.netui.compiler.model.validation.ValidatorConstants;
 import static org.apache.beehive.netui.compiler.JpfLanguageConstants.PAGEFLOW_PACKAGE;
 
 public class ExceptionModel
@@ -133,8 +134,18 @@
         }
         
         if ( xb.getKey() == null && _messageKey != null ) xb.setKey( _messageKey );
+        
+        //
+        // Struts doesn't support "message" directly -- we'll add this as a custom property and also set the key
+        // to something that our error tags will interpret as an expression to be evaluated.
+        //
+        if ( _message != null )
+        {
+            addSetProperty( xb, "defaultMessage", _message );
+            if ( xb.getKey() == null ) xb.setKey( ValidatorConstants.EXPRESSION_KEY_PREFIX + _message );
+        }
+        
         if ( xb.getKey() == null ) xb.setKey( "" );
-        if ( _message != null ) addSetProperty( xb, "defaultMessage", _message );
         
         //
         // Note that we're setting the handler *method* as the handler.  This would break Struts.

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/ExpressionMessage.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/ExpressionMessage.java?view=diff&r1=154455&r2=154456
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/ExpressionMessage.java (original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/ExpressionMessage.java Sat Feb 19 14:13:29 2005
@@ -25,11 +25,21 @@
 {
     public ExpressionMessage( String expression, Object ... messageArgs )
     {
-        super( InternalConstants.MESSAGE_IS_EXPRESSION_PREFIX + expression, messageArgs );
+        super( InternalConstants.MESSAGE_IS_EXPRESSION_PREFIX + expression, expressionizeArgs( messageArgs ) );
     }
     
     public void setExpression( String expression )
     {
         key = InternalConstants.MESSAGE_IS_EXPRESSION_PREFIX + expression;
+    }
+    
+    private static Object[] expressionizeArgs( Object[] args )
+    {
+        for ( int i = 0; i < args.length; i++ )
+        {
+            args[i] = InternalConstants.MESSAGE_IS_EXPRESSION_PREFIX + args[i];
+        }
+        
+        return args;
     }
 }

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowController.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowController.java?view=diff&r1=154455&r2=154456
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowController.java (original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowController.java Sat Feb 19 14:13:29 2005
@@ -525,7 +525,7 @@
             {
                 try
                 {
-                    _log.info( "Handling exception in onCreate(), page flow " + this, th );
+                    _log.info( "Handling exception in onCreate(), FlowController " + this, th );
                     ActionForward fwd = handleException( th, null, null, request, response );
                     if ( fwd == null ) fwd = NULL_ACTION_FORWARD;
                     request.setAttribute( ONCREATE_EXCEPTION_FORWARD, fwd );
@@ -886,8 +886,8 @@
 
     /**
      * Get the current Struts ActionMapping, which is information from the Struts-XML &lt;action&gt;
-     * tag that corresponds to the current page flow action being executed.  This call is only valid
-     * during {@link FlowController#execute} (where any user action method is invoked), and during the lifecycle
+     * tag that corresponds to the current action being executed.  This call is only valid during
+     * {@link FlowController#execute} (where any user action method is invoked), and during the lifecycle
      * methods {@link FlowController#beforeAction} and {@link FlowController#afterAction}.
      * @deprecated Use {@link FlowController#getActionMapping} instead.
      * 
@@ -903,7 +903,7 @@
 
     /**
      * Get the current Struts ActionMapping, which is information from the Struts-XML &lt;action&gt;
-     * tag that corresponds to the current page flow action being executed.  This call is only valid
+     * tag that corresponds to the current action being executed.  This call is only valid
      * during {@link FlowController#execute} (where any user action method is invoked), and during the lifecycle
      * methods {@link FlowController#beforeAction} and {@link FlowController#afterAction}.
      * 
@@ -1013,7 +1013,7 @@
      * Note: this method invokes the full action-processing cycle on a {@link ScopedRequest}.  Use
      *             {@link FlowController#resolveAction} to resolve the URI for an action in the current page flow.
      * @exclude
-     * @deprecated Use {@link PageFlowUtils#strutsLookup} instead.
+     * @deprecated Use {@link PageFlowUtils#strutsLookup} instead.  This method will be removed in v1.1.
      */
     public static ActionResult lookup( String actionName, ServletContext context, HttpServletRequest request,
                                        HttpServletResponse response )
@@ -1027,7 +1027,7 @@
      * Note: this method invokes the full action-processing cycle on a {@link ScopedRequest}.  Use
      *             {@link FlowController#resolveAction} to resolve the URI for an action in the current page flow.
      * @exclude
-     * @deprecated Use {@link PageFlowUtils#strutsLookup} instead.
+     * @deprecated Use {@link PageFlowUtils#strutsLookup} instead.  This method will be removed in v1.1.
      */
     public static ActionResult lookup( String actionName, ServletContext context, HttpServletRequest request,
                                        HttpServletResponse response, String actionServletClassName )
@@ -1042,7 +1042,7 @@
      * @param actionName the name of the action to run.
      * @param form the form bean instance to pass to the action, or <code>null</code> if none should be passed.
      * @return the result webapp-relative URI, as a String.
-     * @throws ActionNotFoundException when the given action does not exist in this page flow.
+     * @throws ActionNotFoundException when the given action does not exist in this FlowController.
      * @throws Exception if the action method throws an Exception.
      */ 
     public String resolveAction( String actionName, Object form, HttpServletRequest request,
@@ -1081,7 +1081,7 @@
      * @param actionName the name of the action to run.
      * @param form the form bean instance to pass to the action, or <code>null</code> if none should be passed.
      * @return the result webapp-relative URI, as a String.
-     * @throws ActionNotFoundException when the given action does not exist in this page flow.
+     * @throws ActionNotFoundException when the given action does not exist in this FlowController.
      * @throws Exception if the action method throws an Exception.
      */ 
     public String resolveAction( String actionName, Object form )
@@ -1198,30 +1198,8 @@
     }
 
     /**
-     * Tell whether this is a "long lived" page flow.  Once it is invoked, a long lived page flow is never
-     * removed from the session unless {@link FlowController#remove} is called.  Navigating to another page flow hides
-     * the current long lived controller, but does not remove it.
-     */
-    protected boolean isLongLived()
-    {
-        return false;
-    }
-    
-    /**
-     * Tell whether this PageFlowController can be "nested", i.e., if it can be invoked from another page
-     * flow with the intention of returning to the original one.  Page flows are declared to be nested
-     * using the <code>@jpf:controller nested="true"</code> annotation.
-     * 
-     * @return <code>true</code> if this PageFlowController can be nested.
-     */
-    protected boolean isNestable()
-    {
-        return false;
-    }
-    
-    /**
-     * When the current page flow does not use a <code>@jpf:forward</code> with a
-     * <code>return-to="previousAction"</code> attribute, the following methods always return
+     * When this FlowController does not use a {@link Jpf.Forward} annotation with a
+     * <code>navigateTo</code>={@link Jpf.NavigateTo.previousAction} attribute, the following methods always return
      * <code>null</code> by default.
      * <ul>
      *     <li>getPreviousActionInfo</li>
@@ -1243,9 +1221,10 @@
     }
     
     /**
-     * When the current page flow does not use a <code>@jpf:forward</code> with either a
-     * <code>return-to="currentPage"</code> or a <code>return-to="previousPage"</code> attribute,
-     * the following methods always return <code>null</code> by default.
+     * When this FlowController does not use a {@link Jpf.Forward} annotation with either a
+     * <code>navigateTo</code>={@link Jpf.NavigateTo.currentPage} attribute or a
+     * <code>navigateTo</code>={@link Jpf.NavigateTo.previousPage} attribute, the following methods always return
+     * <code>null</code> by default.
      * <ul>
      *     <li>getCurrentPageInfo</li>
      *     <li>getPreviousPageInfo</li>
@@ -1269,7 +1248,7 @@
     }
 
     /**
-     * Increment the count of concurrent requests to this page flow.  Note that this method
+     * Increment the count of concurrent requests to this FlowController.  Note that this method
      * is not synchronized -- we use it to decide whether to synchronize on this instance,
      * or to bail out with an error message about too many concurrent requests.
      */
@@ -1314,7 +1293,7 @@
         {
             if ( _log.isDebugEnabled() )
             {
-                _log.debug( "Too many requests to page flow " + getClass().getName() + " ("
+                _log.debug( "Too many requests to FlowController " + getDisplayName() + " ("
                            + ( _requestCount + 1 ) + '>' + _maxConcurrentRequestCount + "); returning error code "
                            + EXCEEDED_MAX_CONCURRENT_REQUESTS_ERRORCODE );
             }
@@ -1543,7 +1522,7 @@
     }
     
     /**
-     * Return the default data source for the Struts module associated with this page flow.
+     * Return the default data source for the Struts module associated with this FlowController.
      *
      * @param request the current request.
      */
@@ -1608,7 +1587,7 @@
      *
      * @deprecated This method can only return the resources for the default
      *             module.  Use {@link #getMessageResources()} to get the
-     *             resources for this page flow.
+     *             resources for this FlowController.
      */
     protected MessageResources getResources()
     {
@@ -1641,7 +1620,7 @@
     }
     
     /**
-     * Get the default message resources for this page flow.
+     * Get the default message resources for this FlowController.
      */
     protected MessageResources getMessageResources()
     {
@@ -1649,7 +1628,7 @@
     }
     
     /**
-     * Get the specified message resources for this page flow.
+     * Get the specified message resources for this FlowController.
      *
      * @param key The bundle key specified in a {@link Jpf.MessageBundle} annotation.
      */
@@ -1922,7 +1901,7 @@
     }
     
     /**
-     * Get the page flow-scoped form bean member associated with the given ActionMapping.
+     * Get the flow-scoped form bean member associated with the given ActionMapping.
      * @exclude
      */ 
     public ActionForm getFormBean( ActionMapping mapping )
@@ -1943,7 +1922,7 @@
             }
             catch ( Exception e )
             {
-                _log.error( "Could not use page flow member " + formMember + " as the form bean.", e );
+                _log.error( "Could not use member field " + formMember + " as the form bean.", e );
             }
         }
         

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/GlobalApp.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/GlobalApp.java?view=diff&r1=154455&r2=154456
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/GlobalApp.java (original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/GlobalApp.java Sat Feb 19 14:13:29 2005
@@ -58,4 +58,12 @@
     {
         return GLOBALAPP_SOURCEFILE_NAME;
     }
+    
+    /**
+     * @deprecated Only page flows ({@link PageFlowController}s) can be nested.
+     */ 
+    public boolean isNestable()
+    {
+        return false;
+    }
 }

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowRequestProcessor.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowRequestProcessor.java?view=diff&r1=154455&r2=154456
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowRequestProcessor.java (original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowRequestProcessor.java Sat Feb 19 14:13:29 2005
@@ -1495,6 +1495,12 @@
         FlowController fc = PageFlowRequestWrapper.get( request ).getCurrentFlowController();
         FlowControllerHandlerContext context = new FlowControllerHandlerContext( request, response, fc );
 
+        // Register this module as the one that's handling the action.
+        if ( fc != null )
+        {
+            InternalUtils.setForwardingModule( request, fc.getModulePath() );
+        }
+        
         //
         // The following is similar to what's in super.processForwardConfig(), but it avoids putting
         // a slash in front of absolute URLs (e.g., ones that start with "http:").

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/DefaultExceptionsHandler.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/DefaultExceptionsHandler.java?view=diff&r1=154455&r2=154456
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/DefaultExceptionsHandler.java (original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/DefaultExceptionsHandler.java Sat Feb 19 14:13:29 2005
@@ -326,12 +326,18 @@
 
         if ( method != null )
         {
+            // First see if there's a hard-coded message set.
             String message = exceptionConfig.getDefaultMessage();
-            String messageKey = exceptionConfig.getKey();
-                    
-            if ( messageKey != null && messageKey.length() > 0 )
+            
+            if ( message == null )
             {
-                message = getMessage( context, messageKey, null, null );
+                // No hard-coded message.  Get the message based on the message key.
+                String messageKey = exceptionConfig.getKey();
+                        
+                if ( messageKey != null && messageKey.length() > 0 )
+                {
+                    message = getMessage( context, messageKey, null, null );
+                }
             }
                     
             return flowController.invokeExceptionHandler( method, ex, message, unwrappedFormBean,

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/InternalUtils.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/InternalUtils.java?view=diff&r1=154455&r2=154456
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/InternalUtils.java (original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/InternalUtils.java Sat Feb 19 14:13:29 2005
@@ -69,6 +69,7 @@
     private static final String SERVLET_CONTEXT_ATTR = ATTR_PREFIX + "servletContext";
     private static final String AVOID_DIRECT_RESPONSE_OUTPUT_ATTR = ATTR_PREFIX + "_avoidDirectResponseOutput";
     private static final String FORWARDED_FORMBEAN_ATTR = ATTR_PREFIX + "forwardedForm";
+    private static final String FORWARDING_MODULE_ATTR = ATTR_PREFIX + "forwardingModule";
     
     
     /**
@@ -1024,5 +1025,21 @@
         }
         
         return retVal;
+    }
+    
+    /**
+     * Set the module prefix for the ModuleConfig that is performing a forward in this request.
+     */ 
+    public static void setForwardingModule( ServletRequest request, String modulePrefix )
+    {
+        request.setAttribute( FORWARDING_MODULE_ATTR, modulePrefix );
+    }
+    
+    /**
+     * Set the module prefix for the ModuleConfig that is performing a forward in this request.
+     */ 
+    public static String getForwardingModule( ServletRequest request )
+    {
+        return ( String ) request.getAttribute( FORWARDING_MODULE_ATTR );
     }
 }

Modified: incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/ErrorBaseTag.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/ErrorBaseTag.java?view=diff&r1=154455&r2=154456
==============================================================================
--- 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 Sat Feb 19 14:13:29 2005
@@ -21,6 +21,7 @@
 import org.apache.beehive.netui.pageflow.config.PageFlowControllerConfig;
 import org.apache.beehive.netui.pageflow.internal.InternalConstants;
 import org.apache.beehive.netui.pageflow.internal.InternalExpressionUtils;
+import org.apache.beehive.netui.pageflow.internal.InternalUtils;
 import org.apache.beehive.netui.tags.AbstractSimpleTag;
 import org.apache.beehive.netui.util.Bundle;
 import org.apache.beehive.netui.util.logging.Logger;
@@ -31,11 +32,13 @@
 import org.apache.struts.config.ModuleConfig;
 import org.apache.struts.taglib.html.Constants;
 import org.apache.struts.util.RequestUtils;
+import org.apache.struts.util.MessageResources;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.PageContext;
 import javax.servlet.jsp.el.ELException;
+import javax.servlet.ServletContext;
 import java.text.MessageFormat;
 import java.util.Locale;
 
@@ -128,14 +131,13 @@
 
     /**
      * @param report
-     * @param bundle
+     * @param bundleName
      * @return message
      * @throws JspException
      */
     protected String getErrorMessage(ActionMessage report, String bundleName)
             throws JspException
     {
-        String message = null;
         String key = report.getKey();
         Object[] messageArgs = report.getValues();
         PageContext pageContext = getPageContext();
@@ -170,13 +172,14 @@
         // The page flow compiler generates InternalConstants.MESSAGE_IS_EXPRESSION_KEY as the message key
         // when the message is actually an expression for us to evaluate at runtime.
         //
+        String message = null;
+        HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
         if (key.length() == 0) {
             return "";
         }
         else if (key.startsWith(InternalConstants.MESSAGE_IS_EXPRESSION_PREFIX)) {
             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();
             try {
                 message = InternalExpressionUtils.evaluateMessage(expression, formBean, request, pageContext.getServletContext());
                 MessageFormat format = new MessageFormat(message);
@@ -189,10 +192,30 @@
         }
         else {
             boolean requestedSpecificBundle = (bundleName != null);
-            boolean missingUserDefaultMessages = isMissingUserDefaultMessages(pageContext);
+            ModuleConfig curModuleConfig = RequestUtils.getModuleConfig(pageContext);
             
-            // First look in the default message bundle for the page flow.
-            if (requestedSpecificBundle || !missingUserDefaultMessages) {
+            // First, look in the message bundle for any shared flow that was involved in this request.
+            String sharedFlowModulePath = InternalUtils.getForwardingModule(pageContext.getRequest());
+            if (sharedFlowModulePath != null && (curModuleConfig == null || ! sharedFlowModulePath.equals(curModuleConfig.getPrefix()))) {
+                ServletContext servletContext = pageContext.getServletContext();
+                ModuleConfig sfModule = InternalUtils.getModuleConfig(sharedFlowModulePath, servletContext);
+                if (requestedSpecificBundle || !isMissingUserDefaultMessages(sfModule)) {
+                    String msgAttr = (bundleName == null ? Globals.MESSAGES_KEY : bundleName) + sfModule.getPrefix();
+                    MessageResources resources = (MessageResources) pageContext.getAttribute(msgAttr, PageContext.APPLICATION_SCOPE);
+                    if (resources != null) {
+                        Locale userLocale = RequestUtils.retrieveUserLocale(pageContext, _locale);
+                        if (messageArgs == null) {
+                            message = resources.getMessage(userLocale, key);
+                        } else {
+                            message = resources.getMessage(userLocale, key, messageArgs);
+                        }
+                    }
+                }
+            }
+                
+            // Next look in the default message bundle for the page flow.
+            boolean missingUserDefaultMessages = isMissingUserDefaultMessages(pageContext);
+            if (message == null && (requestedSpecificBundle || !missingUserDefaultMessages)) {
                 message = RequestUtils.message(pageContext, bundleName, _locale, key, messageArgs);
             }
             
@@ -238,15 +261,22 @@
 
         return message;
     }
-
+    
     /**
-     * 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.
+     * Tell whether the given Struts module has no default message bundle defined.
+     * @return <code>true</code> if the given Struts module has no user-specified default message bundle.
      */
     protected static boolean isMissingUserDefaultMessages(PageContext pageContext)
     {
-        ModuleConfig mc = RequestUtils.getModuleConfig(pageContext);
+        return isMissingUserDefaultMessages(RequestUtils.getModuleConfig(pageContext));
+    }
 
+    /**
+     * Tell whether the given Struts module has no default message bundle defined.
+     * @return <code>true</code> if the given Struts module has no user-specified default message bundle.
+     */
+    protected static boolean isMissingUserDefaultMessages(ModuleConfig mc)
+    {
         if (mc != null) {
             ControllerConfig cc = mc.getControllerConfig();
 

Added: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/src/miniTests/sharedFlowMessageKeys/PageFlowMessages.properties
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/src/miniTests/sharedFlowMessageKeys/PageFlowMessages.properties?view=auto&rev=154456
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/src/miniTests/sharedFlowMessageKeys/PageFlowMessages.properties (added)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/src/miniTests/sharedFlowMessageKeys/PageFlowMessages.properties Sat Feb 19 14:13:29 2005
@@ -0,0 +1 @@
+foo=got the page flow message

Propchange: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/src/miniTests/sharedFlowMessageKeys/PageFlowMessages.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/src/miniTests/sharedFlowMessageKeys/SharedFlowMessages.properties
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/src/miniTests/sharedFlowMessageKeys/SharedFlowMessages.properties?view=auto&rev=154456
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/src/miniTests/sharedFlowMessageKeys/SharedFlowMessages.properties (added)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/src/miniTests/sharedFlowMessageKeys/SharedFlowMessages.properties Sat Feb 19 14:13:29 2005
@@ -0,0 +1,2 @@
+foo=got the shared flow message
+bar=got the shared flow exception message

Propchange: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/src/miniTests/sharedFlowMessageKeys/SharedFlowMessages.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/sharedFlowMessageKeys/Controller.jpf
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/sharedFlowMessageKeys/Controller.jpf?view=auto&rev=154456
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/sharedFlowMessageKeys/Controller.jpf (added)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/sharedFlowMessageKeys/Controller.jpf Sat Feb 19 14:13:29 2005
@@ -0,0 +1,37 @@
+package miniTests.sharedFlowMessageKeys;
+
+import org.apache.beehive.netui.pageflow.*;
+import org.apache.beehive.netui.pageflow.annotations.*;
+
+@Jpf.Controller(
+    simpleActions={
+        @Jpf.SimpleAction(name="begin", path="index.jsp")
+    },
+    sharedFlowRefs={
+        @Jpf.SharedFlowRef(name="sf", type=SharedFlow.class)
+    },
+    messageBundles={
+        @Jpf.MessageBundle(bundlePath="miniTests.sharedFlowMessageKeys.PageFlowMessages")
+    }
+)
+public class Controller extends PageFlowController
+{
+    @Jpf.Action(
+        validationErrorForward=@Jpf.Forward(name="failure", path="index.jsp")
+    )
+    public Forward submit( MyForm form )
+    {
+        return null;
+    }
+
+    public static class MyForm
+    {
+        @Jpf.ValidatableProperty(
+            validateRequired=@Jpf.ValidateRequired(messageKey="foo")
+        )
+        public String getFoo()
+        {
+            return "";
+        }
+    }
+}

Propchange: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/sharedFlowMessageKeys/Controller.jpf
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/sharedFlowMessageKeys/SharedFlow.jpfs
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/sharedFlowMessageKeys/SharedFlow.jpfs?view=auto&rev=154456
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/sharedFlowMessageKeys/SharedFlow.jpfs (added)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/sharedFlowMessageKeys/SharedFlow.jpfs Sat Feb 19 14:13:29 2005
@@ -0,0 +1,50 @@
+package miniTests.sharedFlowMessageKeys;
+
+import org.apache.beehive.netui.pageflow.*;
+import org.apache.beehive.netui.pageflow.annotations.*;
+
+@Jpf.Controller(
+    messageBundles={
+        @Jpf.MessageBundle(bundlePath="miniTests.sharedFlowMessageKeys.SharedFlowMessages")
+    },
+    catches={
+        @Jpf.Catch(type=SharedFlow.Exception1.class, path="index.jsp", messageKey="bar"),
+        @Jpf.Catch(type=SharedFlow.Exception2.class, path="index.jsp", message="got the hardcoded shared flow exception message")
+    }
+)
+public class SharedFlow extends SharedFlowController
+{
+    @Jpf.Action(
+        validationErrorForward=@Jpf.Forward(name="failure", navigateTo=Jpf.NavigateTo.currentPage)
+    )
+    public Forward submit( MyForm form )
+    {
+        return null;
+    }
+
+    @Jpf.Action()
+    public Forward throwException1() throws Exception1
+    {
+        throw new Exception1();
+    }
+
+    @Jpf.Action()
+    public Forward throwException2() throws Exception2
+    {
+        throw new Exception2();
+    }
+
+    public static class MyForm
+    {
+        @Jpf.ValidatableProperty(
+            validateRequired=@Jpf.ValidateRequired(messageKey="foo")
+        )
+        public String getFoo()
+        {
+            return "";
+        }
+    }
+
+    public static class Exception1 extends Exception {}
+    public static class Exception2 extends Exception {}
+}

Propchange: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/sharedFlowMessageKeys/SharedFlow.jpfs
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/sharedFlowMessageKeys/index.jsp
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/sharedFlowMessageKeys/index.jsp?view=auto&rev=154456
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/sharedFlowMessageKeys/index.jsp (added)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/sharedFlowMessageKeys/index.jsp Sat Feb 19 14:13:29 2005
@@ -0,0 +1,30 @@
+<%@ 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>${pageFlow.URI}</h3>
+
+        <span style="color:red"><netui:errors/></span>
+        <br/>
+        <br/>
+
+        <netui:form action="submit">
+            <netui:button value="submit to page flow"/>
+            <netui:button value="submit to shared flow" action="sf.submit"/>
+        </netui:form>
+
+        <netui:anchor action="sf.throwException1">sf.throwException1</netui:anchor>
+        <br/>
+        <netui:anchor action="sf.throwException2">sf.throwException2</netui:anchor>
+    </netui:body>
+</netui:html>
+
+  
+

Propchange: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/sharedFlowMessageKeys/index.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/validation/argExpressions/Controller.jpf
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/validation/argExpressions/Controller.jpf?view=auto&rev=154456
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/validation/argExpressions/Controller.jpf (added)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/validation/argExpressions/Controller.jpf Sat Feb 19 14:13:29 2005
@@ -0,0 +1,85 @@
+package validation.argExpressions;
+
+import org.apache.beehive.netui.pageflow.*;
+import org.apache.beehive.netui.pageflow.annotations.*;
+import org.apache.struts.action.*;
+import javax.servlet.http.*;
+
+@Jpf.Controller(
+    simpleActions={
+        @Jpf.SimpleAction(name="begin", path="index.jsp")
+    }
+)
+public class Controller extends PageFlowController
+{
+    @Jpf.Action(
+        forwards={
+            @Jpf.Forward(name="index", path="index.jsp")
+        },
+        validationErrorForward=@Jpf.Forward(name="failure", path="index.jsp")
+    )
+    public Forward validateMethod( Form1 form )
+    {
+        return new Forward( "index" );
+    }
+
+    @Jpf.Action(
+        forwards={
+            @Jpf.Forward(name="index", path="index.jsp")
+        },
+        validationErrorForward=@Jpf.Forward(name="failure", path="index.jsp")
+    )
+    public Forward validateAnnotations( Form2 form )
+    {
+        return new Forward( "index" );
+    }
+
+    public String getMessage()
+    {
+        return "These are some args.  arg0={0}, arg1={1}";
+    }
+
+    public String getArg0()
+    {
+        return "ARG0!";
+    }
+
+    public String getArg1()
+    {
+        return "ARG1!";
+    }
+
+    public static class Form1 implements Validatable
+    {
+        public void validate( ActionMapping mapping, HttpServletRequest request, ActionMessages errors )
+        {
+            errors.add( "foo", new ExpressionMessage( "(Form1) this is arg 0: {0}", "${pageFlow.arg0}" ) );
+            errors.add( "bar", new ExpressionMessage( "(Form1) ${pageFlow.message}", "${pageFlow.arg0}", "${pageFlow.arg1}" ) );
+        }
+    }
+
+    public static class Form2
+    {
+        @Jpf.ValidatableProperty(
+            validateRequired=@Jpf.ValidateRequired(
+                message="(Form2) this is arg0: {0}",
+                messageArgs={@Jpf.MessageArg(arg="${pageFlow.arg0}")}
+            )
+        )
+        public String getFoo()
+        {
+            return "";
+        }
+
+        @Jpf.ValidatableProperty(
+            validateRequired=@Jpf.ValidateRequired(
+                message="(Form2) ${pageFlow.message}",
+                messageArgs={@Jpf.MessageArg(arg="${pageFlow.arg0}"), @Jpf.MessageArg(arg="${pageFlow.arg1}")}
+            )
+        )
+        public String getBar()
+        {
+            return "";
+        }
+    }
+}

Propchange: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/validation/argExpressions/Controller.jpf
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/validation/argExpressions/index.jsp
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/validation/argExpressions/index.jsp?view=auto&rev=154456
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/validation/argExpressions/index.jsp (added)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/validation/argExpressions/index.jsp Sat Feb 19 14:13:29 2005
@@ -0,0 +1,29 @@
+<%@ 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>${pageFlow.URI}</h3>
+
+        <span style="color:red">
+            <ul>
+                <li><netui:error key="foo"/></li>
+                <li><netui:error key="bar"/></li>
+            </ul>
+        </span>
+        <br/>
+        <br/>
+        <netui:anchor action="validateMethod">validateMethod</netui:anchor>
+        <br/>
+        <netui:anchor action="validateAnnotations">validateAnnotations</netui:anchor>
+    </netui:body>
+</netui:html>
+
+  
+

Propchange: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/validation/argExpressions/index.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml?view=diff&r1=154455&r2=154456
==============================================================================
--- 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 Feb 19 14:13:29 2005
@@ -6058,6 +6058,22 @@
          </features>
       </test>
       <test>
+         <name>SharedFlowMessageKeys</name>
+         <description>Test of reading messages from message bundles (in @Jpf.Catch and in validation) in shared flows.</description>
+         <webapp>coreWeb</webapp>
+         <categories>
+            <category>bvt</category>
+            <category>bvt.struts11</category>
+            <category>corePageFlow</category>
+         </categories>
+         <features>
+            <feature>Exceptions</feature>
+            <feature>PageFlow</feature>
+            <feature>SharedFlow</feature>
+            <feature>Validation</feature>
+         </features>
+      </test>
+      <test>
          <name>SimpleAction</name>
          <description>Test of Simple Actions</description>
          <webapp>coreWeb</webapp>
@@ -6928,6 +6944,20 @@
       <test>
          <name>Validation2</name>
          <description>Tests of basic validation and validation using the Struts ValidatorPlugIn (as well as netui:error, netui:errors).</description>
+         <webapp>coreWeb</webapp>
+         <categories>
+            <category>bvt</category>
+            <category>bvt.struts11</category>
+            <category>corePageFlow</category>
+         </categories>
+         <features>
+            <feature>Form</feature>
+            <feature>Validation</feature>
+         </features>
+      </test>
+      <test>
+         <name>ValidationArgExpressions</name>
+         <description>Test of using databinding expressions in validation message arguments.</description>
          <webapp>coreWeb</webapp>
          <categories>
             <category>bvt</category>

Added: incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/SharedFlowMessageKeys.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/SharedFlowMessageKeys.xml?view=auto&rev=154456
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/SharedFlowMessageKeys.xml (added)
+++ incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/SharedFlowMessageKeys.xml Sat Feb 19 14:13:29 2005
@@ -0,0 +1,477 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ses:recorderSession xmlns:ses="http://beehive.apache.org/netui/tools/testrecorder/2004/session">
+   <ses:sessionName>SharedFlowMessageKeys</ses:sessionName>
+   <ses:tester>rich</ses:tester>
+   <ses:startDate>18 Feb 2005, 11:43:26.073 PM MST</ses:startDate>
+   <ses:description>Test of reading messages from message bundles (in @Jpf.Catch and in validation) in shared flows.</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/miniTests/sharedFlowMessageKeys/Controller.jpf</ses:uri>
+            <ses:method>GET</ses:method>
+            <ses:parameters/>
+            <ses:cookies>
+               <ses:cookie>
+                  <ses:name>JSESSIONID</ses:name>
+                  <ses:value>4DFF9ACAF26F23E7B01F953748EDE0D5</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=4DFF9ACAF26F23E7B01F953748EDE0D5</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.5) Gecko/20041107 Firefox/1.0</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/miniTests/sharedFlowMessageKeys/index.jsp">
+    </head>
+    <body>
+        <h3>/miniTests/sharedFlowMessageKeys/Controller.jpf</h3>
+
+        <span style="color:red"></span>
+        <br/>
+        <br/>
+
+        <form action="/coreWeb/miniTests/sharedFlowMessageKeys/submit.do" method="post">
+            <input type="submit" value="submit to page flow">
+            <input type="submit" name="actionOverride:sf.submit" value="submit to shared flow">
+        </form>
+
+        <a href="/coreWeb/miniTests/sharedFlowMessageKeys/sf.throwException1.do">sf.throwException1</a>
+        <br/>
+        <a href="/coreWeb/miniTests/sharedFlowMessageKeys/sf.throwException2.do">sf.throwException2</a>
+    </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/miniTests/sharedFlowMessageKeys/submit.do</ses:uri>
+            <ses:method>POST</ses:method>
+            <ses:parameters/>
+            <ses:cookies>
+               <ses:cookie>
+                  <ses:name>JSESSIONID</ses:name>
+                  <ses:value>4DFF9ACAF26F23E7B01F953748EDE0D5</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>0</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=4DFF9ACAF26F23E7B01F953748EDE0D5</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/miniTests/sharedFlowMessageKeys/Controller.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.5) Gecko/20041107 Firefox/1.0</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/miniTests/sharedFlowMessageKeys/index.jsp">
+    </head>
+    <body>
+        <h3>/miniTests/sharedFlowMessageKeys/Controller.jpf</h3>
+
+        <span style="color:red">got the page flow message
+</span>
+        <br/>
+        <br/>
+
+        <form action="/coreWeb/miniTests/sharedFlowMessageKeys/submit.do" method="post">
+            <input type="submit" value="submit to page flow">
+            <input type="submit" name="actionOverride:sf.submit" value="submit to shared flow">
+        </form>
+
+        <a href="/coreWeb/miniTests/sharedFlowMessageKeys/sf.throwException1.do">sf.throwException1</a>
+        <br/>
+        <a href="/coreWeb/miniTests/sharedFlowMessageKeys/sf.throwException2.do">sf.throwException2</a>
+    </body>
+
+</html>]]></ses:responseBody>
+         </ses:response>
+      </ses:test>
+      <ses:test>
+         <ses:testNumber>3</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/miniTests/sharedFlowMessageKeys/submit.do</ses:uri>
+            <ses:method>POST</ses:method>
+            <ses:parameters>
+               <ses:parameter>
+                  <ses:name>actionOverride:sf.submit</ses:name>
+                  <ses:value>submit to shared flow</ses:value>
+               </ses:parameter>
+            </ses:parameters>
+            <ses:cookies>
+               <ses:cookie>
+                  <ses:name>JSESSIONID</ses:name>
+                  <ses:value>4DFF9ACAF26F23E7B01F953748EDE0D5</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>48</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=4DFF9ACAF26F23E7B01F953748EDE0D5</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/miniTests/sharedFlowMessageKeys/submit.do</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.5) Gecko/20041107 Firefox/1.0</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/miniTests/sharedFlowMessageKeys/index.jsp">
+    </head>
+    <body>
+        <h3>/miniTests/sharedFlowMessageKeys/Controller.jpf</h3>
+
+        <span style="color:red">got the shared flow message
+</span>
+        <br/>
+        <br/>
+
+        <form action="/coreWeb/miniTests/sharedFlowMessageKeys/submit.do" method="post">
+            <input type="submit" value="submit to page flow">
+            <input type="submit" name="actionOverride:sf.submit" value="submit to shared flow">
+        </form>
+
+        <a href="/coreWeb/miniTests/sharedFlowMessageKeys/sf.throwException1.do">sf.throwException1</a>
+        <br/>
+        <a href="/coreWeb/miniTests/sharedFlowMessageKeys/sf.throwException2.do">sf.throwException2</a>
+    </body>
+
+</html>]]></ses:responseBody>
+         </ses:response>
+      </ses:test>
+      <ses:test>
+         <ses:testNumber>4</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/miniTests/sharedFlowMessageKeys/sf.throwException1.do</ses:uri>
+            <ses:method>GET</ses:method>
+            <ses:parameters/>
+            <ses:cookies>
+               <ses:cookie>
+                  <ses:name>JSESSIONID</ses:name>
+                  <ses:value>4DFF9ACAF26F23E7B01F953748EDE0D5</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=4DFF9ACAF26F23E7B01F953748EDE0D5</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/miniTests/sharedFlowMessageKeys/submit.do</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.5) Gecko/20041107 Firefox/1.0</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/miniTests/sharedFlowMessageKeys/index.jsp">
+    </head>
+    <body>
+        <h3>/miniTests/sharedFlowMessageKeys/Controller.jpf</h3>
+
+        <span style="color:red">got the shared flow exception message
+</span>
+        <br/>
+        <br/>
+
+        <form action="/coreWeb/miniTests/sharedFlowMessageKeys/submit.do" method="post">
+            <input type="submit" value="submit to page flow">
+            <input type="submit" name="actionOverride:sf.submit" value="submit to shared flow">
+        </form>
+
+        <a href="/coreWeb/miniTests/sharedFlowMessageKeys/sf.throwException1.do">sf.throwException1</a>
+        <br/>
+        <a href="/coreWeb/miniTests/sharedFlowMessageKeys/sf.throwException2.do">sf.throwException2</a>
+    </body>
+
+</html>]]></ses:responseBody>
+         </ses:response>
+      </ses:test>
+      <ses:test>
+         <ses:testNumber>5</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/miniTests/sharedFlowMessageKeys/sf.throwException2.do</ses:uri>
+            <ses:method>GET</ses:method>
+            <ses:parameters/>
+            <ses:cookies>
+               <ses:cookie>
+                  <ses:name>JSESSIONID</ses:name>
+                  <ses:value>4DFF9ACAF26F23E7B01F953748EDE0D5</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=4DFF9ACAF26F23E7B01F953748EDE0D5</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/miniTests/sharedFlowMessageKeys/sf.throwException1.do</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.5) Gecko/20041107 Firefox/1.0</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/miniTests/sharedFlowMessageKeys/index.jsp">
+    </head>
+    <body>
+        <h3>/miniTests/sharedFlowMessageKeys/Controller.jpf</h3>
+
+        <span style="color:red">got the hardcoded shared flow exception message
+</span>
+        <br/>
+        <br/>
+
+        <form action="/coreWeb/miniTests/sharedFlowMessageKeys/submit.do" method="post">
+            <input type="submit" value="submit to page flow">
+            <input type="submit" name="actionOverride:sf.submit" value="submit to shared flow">
+        </form>
+
+        <a href="/coreWeb/miniTests/sharedFlowMessageKeys/sf.throwException1.do">sf.throwException1</a>
+        <br/>
+        <a href="/coreWeb/miniTests/sharedFlowMessageKeys/sf.throwException2.do">sf.throwException2</a>
+    </body>
+
+</html>]]></ses:responseBody>
+         </ses:response>
+      </ses:test>
+   </ses:tests>
+   <ses:endDate>18 Feb 2005, 11:43:43.849 PM MST</ses:endDate>
+   <ses:testCount>5</ses:testCount>
+</ses:recorderSession>

Propchange: incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/SharedFlowMessageKeys.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ValidationArgExpressions.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ValidationArgExpressions.xml?view=auto&rev=154456
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ValidationArgExpressions.xml (added)
+++ incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ValidationArgExpressions.xml Sat Feb 19 14:13:29 2005
@@ -0,0 +1,275 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ses:recorderSession xmlns:ses="http://beehive.apache.org/netui/tools/testrecorder/2004/session">
+   <ses:sessionName>ValidationArgExpressions</ses:sessionName>
+   <ses:tester>rich</ses:tester>
+   <ses:startDate>18 Feb 2005, 12:22:46.154 PM MST</ses:startDate>
+   <ses:description>Test of using databinding expressions in validation message arguments.</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/argExpressions/Controller.jpf</ses:uri>
+            <ses:method>GET</ses:method>
+            <ses:parameters/>
+            <ses:cookies>
+               <ses:cookie>
+                  <ses:name>JSESSIONID</ses:name>
+                  <ses:value>9D0640F4B035A010305AE0C945B50FA5</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=9D0640F4B035A010305AE0C945B50FA5</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.5) Gecko/20041107 Firefox/1.0</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/argExpressions/index.jsp">
+    </head>
+    <body>
+        <h3>/validation/argExpressions/Controller.jpf</h3>
+
+        <span style="color:red">
+            <ul>
+                <li></li>
+                <li></li>
+            </ul>
+        </span>
+        <br/>
+        <br/>
+        <a href="/coreWeb/validation/argExpressions/validateMethod.do">validateMethod</a>
+        <br/>
+        <a href="/coreWeb/validation/argExpressions/validateAnnotations.do">validateAnnotations</a>
+    </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/argExpressions/validateMethod.do</ses:uri>
+            <ses:method>GET</ses:method>
+            <ses:parameters/>
+            <ses:cookies>
+               <ses:cookie>
+                  <ses:name>JSESSIONID</ses:name>
+                  <ses:value>9D0640F4B035A010305AE0C945B50FA5</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=9D0640F4B035A010305AE0C945B50FA5</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/argExpressions/Controller.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.5) Gecko/20041107 Firefox/1.0</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/argExpressions/index.jsp">
+    </head>
+    <body>
+        <h3>/validation/argExpressions/Controller.jpf</h3>
+
+        <span style="color:red">
+            <ul>
+                <li>(Form1) this is arg 0: ARG0!
+</li>
+                <li>(Form1) These are some args.  arg0=ARG0!, arg1=ARG1!
+</li>
+            </ul>
+        </span>
+        <br/>
+        <br/>
+        <a href="/coreWeb/validation/argExpressions/validateMethod.do">validateMethod</a>
+        <br/>
+        <a href="/coreWeb/validation/argExpressions/validateAnnotations.do">validateAnnotations</a>
+    </body>
+
+</html>]]></ses:responseBody>
+         </ses:response>
+      </ses:test>
+      <ses:test>
+         <ses:testNumber>3</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/argExpressions/validateAnnotations.do</ses:uri>
+            <ses:method>GET</ses:method>
+            <ses:parameters/>
+            <ses:cookies>
+               <ses:cookie>
+                  <ses:name>JSESSIONID</ses:name>
+                  <ses:value>9D0640F4B035A010305AE0C945B50FA5</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=9D0640F4B035A010305AE0C945B50FA5</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/argExpressions/validateMethod.do</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.5) Gecko/20041107 Firefox/1.0</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/argExpressions/index.jsp">
+    </head>
+    <body>
+        <h3>/validation/argExpressions/Controller.jpf</h3>
+
+        <span style="color:red">
+            <ul>
+                <li>(Form2) this is arg0: ARG0!
+</li>
+                <li>(Form2) These are some args.  arg0=ARG0!, arg1=ARG1!
+</li>
+            </ul>
+        </span>
+        <br/>
+        <br/>
+        <a href="/coreWeb/validation/argExpressions/validateMethod.do">validateMethod</a>
+        <br/>
+        <a href="/coreWeb/validation/argExpressions/validateAnnotations.do">validateAnnotations</a>
+    </body>
+
+</html>]]></ses:responseBody>
+         </ses:response>
+      </ses:test>
+   </ses:tests>
+   <ses:endDate>18 Feb 2005, 12:23:05.011 PM MST</ses:endDate>
+   <ses:testCount>3</ses:testCount>
+</ses:recorderSession>

Propchange: incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/ValidationArgExpressions.xml
------------------------------------------------------------------------------
    svn:eol-style = native