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/11/10 01:03:34 UTC

svn commit: rev 57113 - in incubator/beehive/trunk/netui: src/compiler/org/apache/beehive/netui/compiler src/compiler/org/apache/beehive/netui/compiler/apt src/compiler/org/apache/beehive/netui/compiler/model src/pageflow/org/apache/beehive/netui/pageflow src/pageflow/org/apache/beehive/netui/pageflow/annotations src/pageflow/org/apache/beehive/netui/pageflow/handler src/pageflow/org/apache/beehive/netui/pageflow/internal src/tags-html/org/apache/beehive/netui/tags/html test/webapps/drt/coreWeb/pageFlowCore/passToFromNested test/webapps/drt/coreWeb/pageFlowCore/passToFromNested/nested test/webapps/drt/testRecorder/tests

Author: rich
Date: Tue Nov  9 16:03:33 2004
New Revision: 57113

Added:
   incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/passToFromNested/
   incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/passToFromNested/PassToFromNestedController.jpf   (contents, props changed)
   incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/passToFromNested/dataIn_done.jsp   (contents, props changed)
   incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/passToFromNested/index.jsp   (contents, props changed)
   incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/passToFromNested/nested/
   incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/passToFromNested/nested/NestedController.jpf   (contents, props changed)
   incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/passToFromNested/nested/dataIn.jsp   (contents, props changed)
   incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/passToFromNested/nested/string.jsp   (contents, props changed)
   incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/passToFromNested/string_done.jsp   (contents, props changed)
Modified:
   incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/CompilerUtils.java
   incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FlowControllerChecker.java
   incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/apt/PageFlowAnnotationProcessor.java
   incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/ActionModel.java
   incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/StrutsApp.java
   incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FacesBackingBeanFactory.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/Forward.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/annotations/Jpf.java
   incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/handler/ReloadableClassHandler.java
   incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/AnyBeanActionForm.java
   incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/DefaultReloadableClassHandler.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/Form.java
   incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/JpfScopedFormsTest49.xml
   incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/OverloadedActions.xml
Log:
Fixes for:
    - http://nagoya.apache.org/jira/browse/BEEHIVE-60 : form input field not initialized when databinding to page flow scoped form
    - http://nagoya.apache.org/jira/browse/BEEHIVE-41 : Cannot use an interface as the form bean for an action
    - http://nagoya.apache.org/jira/browse/BEEHIVE-40 : Cannot use @Jpf.ActionOutput without 'typeHint' attribute

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



Modified: incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/CompilerUtils.java
==============================================================================
--- incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/CompilerUtils.java	(original)
+++ incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/CompilerUtils.java	Tue Nov  9 16:03:33 2004
@@ -19,6 +19,9 @@
 
 import com.sun.mirror.declaration.*;
 import com.sun.mirror.apt.AnnotationProcessorEnvironment;
+import com.sun.mirror.apt.Messager;
+import com.sun.mirror.apt.Filer;
+import com.sun.mirror.apt.AnnotationProcessorListener;
 import com.sun.mirror.type.ClassType;
 import com.sun.mirror.type.ReferenceType;
 import com.sun.mirror.type.TypeMirror;
@@ -27,6 +30,8 @@
 import com.sun.mirror.type.ArrayType;
 import com.sun.mirror.util.SourcePosition;
 import com.sun.mirror.util.DeclarationVisitor;
+import com.sun.mirror.util.Declarations;
+import com.sun.mirror.util.Types;
 
 import java.net.URI;
 import java.net.URISyntaxException;
@@ -44,7 +49,6 @@
         implements JpfLanguageConstants
 {
     private static final ErrorTypeDeclaration ERROR_TYPE_DECLARATION = new ErrorTypeDeclaration();
-    public static final String USE_EQUALS_TO_COMPARE_ANNOTATIONS_ATTR = "useEqualsToCompareAnnotations";
     
     
     public static boolean isJpfAnnotation( AnnotationMirror annotation, String unqualifiedName )
@@ -742,6 +746,85 @@
         return null;
     }
     
+    public static class ExtendedAnnotationProcessorEnvironment
+            implements AnnotationProcessorEnvironment
+    {
+        private AnnotationProcessorEnvironment _env;
+        private boolean _useEqualsToCompareAnnotations;
+
+        public ExtendedAnnotationProcessorEnvironment( AnnotationProcessorEnvironment env,
+                                                       boolean useEqualsToCompareAnnotations )
+        {
+            _env = env;
+            _useEqualsToCompareAnnotations = useEqualsToCompareAnnotations;
+        }
+        
+        public boolean useEqualsToCompareAnnotations()
+        {
+            return _useEqualsToCompareAnnotations;
+        }
+        
+        public Map<String, String> getOptions()
+        {
+            return _env.getOptions();
+        }
+
+        public Messager getMessager()
+        {
+            return _env.getMessager();
+        }
+
+        public Filer getFiler()
+        {
+            return _env.getFiler();
+        }
+
+        public Collection<TypeDeclaration> getSpecifiedTypeDeclarations()
+        {
+            return _env.getSpecifiedTypeDeclarations();
+        }
+
+        public PackageDeclaration getPackage( String s )
+        {
+            return _env.getPackage( s );
+        }
+
+        public TypeDeclaration getTypeDeclaration( String s )
+        {
+            return _env.getTypeDeclaration( s );
+        }
+
+        public Collection<TypeDeclaration> getTypeDeclarations()
+        {
+            return _env.getTypeDeclarations();
+        }
+
+        public Collection<com.sun.mirror.declaration.Declaration> getDeclarationsAnnotatedWith( AnnotationTypeDeclaration annotationTypeDeclaration )
+        {
+            return _env.getDeclarationsAnnotatedWith( annotationTypeDeclaration );
+        }
+
+        public Declarations getDeclarationUtils()
+        {
+            return _env.getDeclarationUtils();
+        }
+
+        public Types getTypeUtils()
+        {
+            return _env.getTypeUtils();
+        }
+
+        public void addListener( AnnotationProcessorListener annotationProcessorListener )
+        {
+            _env.addListener( annotationProcessorListener );
+        }
+
+        public void removeListener( AnnotationProcessorListener annotationProcessorListener )
+        {
+            _env.removeListener( annotationProcessorListener );
+        }
+    }
+    
     public static boolean annotationsAreEqual( AnnotationMirror a1, AnnotationMirror a2, boolean allowExactDuplicates,
                                                AnnotationProcessorEnvironment env ) 
     {
@@ -754,7 +837,8 @@
         // and wrong if the two annotations 'look' exactly the same.
         //
         if ( ! allowExactDuplicates
-             && Boolean.parseBoolean( env.getOptions().get( USE_EQUALS_TO_COMPARE_ANNOTATIONS_ATTR ) ) )
+             && env instanceof ExtendedAnnotationProcessorEnvironment
+             && ( ( ExtendedAnnotationProcessorEnvironment ) env ).useEqualsToCompareAnnotations() )
         {
             return a1.equals( a2 );
         }

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/FlowControllerChecker.java	(original)
+++ incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FlowControllerChecker.java	Tue Nov  9 16:03:33 2004
@@ -298,9 +298,7 @@
             {
                 argTypeDecl = CompilerUtils.getDeclaration( ( DeclaredType ) argType );
                 
-                if ( ! CompilerUtils.hasDefaultConstructor( argTypeDecl )
-                        && ! CompilerUtils.isAssignableFrom( BEA_XMLOBJECT_CLASS_NAME, argType, getEnv() )
-                        && ! CompilerUtils.isAssignableFrom( APACHE_XMLOBJECT_CLASS_NAME, argType, getEnv() ) )
+                if ( argTypeDecl instanceof ClassDeclaration && ! CompilerUtils.hasDefaultConstructor( argTypeDecl ) )
                 {
                     getDiagnostics().addError( method, "error.action-method-arg-no-default-constructor",
                                            argTypeDecl.getQualifiedName() );

Modified: incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/apt/PageFlowAnnotationProcessor.java
==============================================================================
--- incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/apt/PageFlowAnnotationProcessor.java	(original)
+++ incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/apt/PageFlowAnnotationProcessor.java	Tue Nov  9 16:03:33 2004
@@ -18,9 +18,17 @@
 package org.apache.beehive.netui.compiler.apt;
 
 import com.sun.mirror.apt.AnnotationProcessorEnvironment;
+import com.sun.mirror.apt.Messager;
+import com.sun.mirror.apt.Filer;
+import com.sun.mirror.apt.AnnotationProcessorListener;
 import com.sun.mirror.declaration.AnnotationMirror;
 import com.sun.mirror.declaration.ClassDeclaration;
 import com.sun.mirror.declaration.Modifier;
+import com.sun.mirror.declaration.PackageDeclaration;
+import com.sun.mirror.declaration.TypeDeclaration;
+import com.sun.mirror.declaration.AnnotationTypeDeclaration;
+import com.sun.mirror.util.Declarations;
+import com.sun.mirror.util.Types;
 import org.apache.beehive.netui.compiler.BaseChecker;
 import org.apache.beehive.netui.compiler.CompilerUtils;
 import org.apache.beehive.netui.compiler.Diagnostics;
@@ -40,6 +48,8 @@
 import static org.apache.beehive.netui.compiler.JpfLanguageConstants.ANNOTATIONS_CLASSNAME;
 
 import java.io.File;
+import java.util.Map;
+import java.util.Collection;
 
 
 public class PageFlowAnnotationProcessor

Modified: incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/ActionModel.java
==============================================================================
--- incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/ActionModel.java	(original)
+++ incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/model/ActionModel.java	Tue Nov  9 16:03:33 2004
@@ -51,7 +51,7 @@
     private String _forward;
     private String _include;
     private String _input;
-    private String _name;
+    private String _formBeanName;
     private String _parameter;
     private String _path;  // required to be set
     private String _prefix;
@@ -83,7 +83,7 @@
     {
         super( parent );
         this._path = path;
-        this._name = formName;
+        this._formBeanName = formName;
     }
     
     protected ActionModel( StrutsApp parent )
@@ -98,7 +98,7 @@
     {
         super( src );
         this._path = newPath;
-        this._name = src._name;
+        this._formBeanName = src._formBeanName;
         _exceptionCatches = ( ArrayList ) src._exceptionCatches.clone();
         _attribute = src._attribute;
         _className = src._className;
@@ -123,16 +123,16 @@
     
     public void setFormBeanName( String formBeanName )
     {
-        _name = formBeanName;
+        _formBeanName = formBeanName;
     }
     
     public void writeToXMLBean( Action xb )
     {
         xb.setPath( _path );
         
-        if ( xb.getName() == null && _name != null )
+        if ( xb.getName() == null && _formBeanName != null )
         {
-            xb.setName( _name );
+            xb.setName( _formBeanName );
         }
 
         if ( xb.getClassName() == null && _className != null )
@@ -349,12 +349,17 @@
 
     public String getName()
     {
-        return _name;
+        return _formBeanName;
+    }
+    
+    public String getFormBeanName()
+    {
+        return _formBeanName;
     }
 
     public void setName( String name )
     {
-        this._name = name;
+        this._formBeanName = name;
     }
 
     public String getParameter()
@@ -542,4 +547,6 @@
     {
         _formBeanMessageResourcesKey = formBeanMessageResourcesKey;
     }
+    
+
 }

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 Nov  9 16:03:33 2004
@@ -47,10 +47,10 @@
         implements ForwardContainer, ExceptionContainer
 {
     //protected boolean _isRootApp = false;
-    private ArrayList _actionMappings = new ArrayList();
-    private ArrayList _exceptionCatches = new ArrayList();
+    private HashMap< String, ActionModel > _actionMappings = new HashMap< String, ActionModel >();
+    private ArrayList< ExceptionModel > _exceptionCatches = new ArrayList< ExceptionModel >();
     private ArrayList< MessageResourcesModel > _messageResources = new ArrayList< MessageResourcesModel >();
-    private Map _formBeans = new HashMap();
+    private HashMap< String, FormBeanModel > _formBeans = new HashMap< String, FormBeanModel >();
     private ValidationModel _validationModel;
 
     private boolean _returnToPageDisabled = true;
@@ -99,96 +99,85 @@
         addMessageResources( mrm );
     }
 
-    /**
-     * Returns all of the action mappings that are defined for this StrutsApp.
-     */
-    public ActionModel[] getActionMappings()
-    {
-        return ( ActionModel[] ) _actionMappings.toArray( new ActionModel[0] );
-    }
-
-    /**
-     * Returns all of the action mappings that are defined for this
-     * StrutsApp as a list that is a clone of this StrutsApp's internal list.
-     */
-    public List getActionMappingsAsList()
-    {
-        return ( List ) _actionMappings.clone();
-    }
-
     public void addMessageResources( MessageResourcesModel mr )
     {
         _messageResources.add( mr );
     }
     
+    private void addDisambiguatedActionMapping( ActionModel mapping )
+    {
+        if ( mapping.getFormBeanName() != null )
+        {
+            String qualifiedPath = getFormQualifiedActionPath( mapping );
+            ActionModel qualifiedMapping = new ActionModel( mapping, qualifiedPath );
+            qualifiedMapping.setUnqualifiedActionPath( mapping.getPath() );
+            _actionMappings.put( qualifiedPath, qualifiedMapping );
+        }
+    }
+    
     /**
      * Adds a new ActionMapping to this StrutsApp.
      */
-    public void addActionMapping( ActionModel newActionMapping )
+    public void addActionMapping( ActionModel mapping )
     {
-        String newActionMappingQualifiedPath = getFormQualifiedActionPath( newActionMapping );
-        boolean addThisMapping = true;
+        String mappingPath = mapping.getPath();
+        ActionModel conflictingActionMapping = _actionMappings.get( mappingPath );
         
-        //
-        // First see if there's a name conflict.  If so, we'll add an extra mapping to disambiguate.
-        //
-        for ( int i = 0; i < _actionMappings.size(); ++i )
+        if ( conflictingActionMapping != null )
         {
-            ActionModel mapping = ( ActionModel ) _actionMappings.get( i );
+            ActionModel defaultMappingForThisPath = conflictingActionMapping;
             
-            if ( mapping.getPath().equals( newActionMapping.getPath() ) )
+            //
+            // If the new action mapping takes no form, then it has the highest precedence, and replaces the existing
+            // "natural" mapping for the given path.  Otherwise, replace the existing one if the existing one has a
+            // form bean and if the new mapping's form bean type comes alphabetically before the existing one's.
+            //
+            if ( mapping.getFormBeanName() == null
+                 || ( conflictingActionMapping.getFormBeanName() != null
+                      && getBeanType( mapping ).compareTo( getBeanType( conflictingActionMapping ) ) < 0 ) )
             {
-                // Tack on the form-name (mapping.getName()).
-                ActionModel qualifiedMapping = createActionModel( mapping, getFormQualifiedActionPath( mapping ) );
-                ActionModel qualifiedNewMapping = createActionModel( newActionMapping, newActionMappingQualifiedPath );
-                qualifiedMapping.setUnqualifiedActionPath( mapping.getPath() );
-                qualifiedNewMapping.setUnqualifiedActionPath( newActionMapping.getPath() );
-                _actionMappings.add( qualifiedMapping );
-                _actionMappings.add( qualifiedNewMapping );
-                
-                if ( qualifiedMapping.getPath().compareTo( newActionMappingQualifiedPath ) < 0 ) addThisMapping = false;
+                _actionMappings.put( mappingPath, mapping );
+                defaultMappingForThisPath = mapping;
+                conflictingActionMapping.setOverloaded( false );
             }
+            
+            addDisambiguatedActionMapping( mapping );
+            addDisambiguatedActionMapping( conflictingActionMapping );
+            defaultMappingForThisPath.setOverloaded( true );
+            defaultMappingForThisPath.setComment( DUPLICATE_ACTION_COMMENT.replaceAll( "\\{0\\}", mappingPath ) );  // @TODO I18N
+        }
+        else
+        {
+            _actionMappings.put( mappingPath, mapping );
         }
-        
-        if ( addThisMapping ) _actionMappings.add( newActionMapping );
     }
 
-    protected ActionModel createActionModel( ActionModel src, String newPath )
-    {
-        return new ActionModel( src, newPath );
-    }
     
-    protected String getFormQualifiedActionPath( ActionModel action )
+    //
+    // Returns either the "form class" (specified for non-ActionForm-derived bean types), or the type of the
+    // associated FormBeanModel.
+    //
+    public String getBeanType( ActionModel actionMapping )
     {
-        String formName = action.getName(); // this is the name of the form, not the name of the action.
+        String beanType = actionMapping.getFormClass();    // will be non-null for non-ActionForm-derived types
         
-        if ( formName == null )
+        if ( beanType == null )
         {
-            return action.getPath() + '_';
-        }
-        else
-        {
-            String beanName = action.getFormClass();    // will be non-null for non-ActionForm-derived types
-            
-            if ( beanName == null )
-            {
-                FormBeanModel bean = getFormBean( formName );
-                assert bean != null;
-                beanName = bean.getType();
-            }
-            
-            return action.getPath() + '_' + makeFullyQualifiedBeanName( beanName );
+            FormBeanModel bean = getFormBean( actionMapping.getFormBeanName() );
+            assert bean != null;
+            beanType = bean.getType();
         }
+        
+        return beanType;
     }
     
-    /**
-     * Deletes the given ActionModel.
-     */
-    public void deleteActionMapping( ActionModel actionMapping )
+    protected String getFormQualifiedActionPath( ActionModel action )
     {
-        _actionMappings.remove( actionMapping );
+        assert action.getFormBeanName() != null : "action " + action.getPath() + " has no form bean";
+        String beanType = getBeanType( action );
+        return action.getPath() + '_' + makeFullyQualifiedBeanName( beanType );
     }
-
+    
     /**
      * Implemented for {@link ExceptionContainer}.
      */
@@ -221,18 +210,14 @@
     /**
      * Returns a list of all the form beans that are defined for this StrutsApp.
      */
-    public List getFormBeansAsList()
+    public List< FormBeanModel > getFormBeansAsList()
     {
-        ArrayList retList = new ArrayList();
+        ArrayList< FormBeanModel > retList = new ArrayList< FormBeanModel >();
         
         for ( Iterator i = _formBeans.values().iterator(); i.hasNext(); )
         {
             FormBeanModel fb = ( FormBeanModel ) i.next();
-            
-            if ( fb != null )
-            {
-                retList.add( fb );
-            }
+            if ( fb != null ) retList.add( fb );
         }
         
         return retList;
@@ -240,7 +225,7 @@
 
     public FormBeanModel getFormBean( String formBeanName )
     {
-        return ( FormBeanModel ) _formBeans.get( formBeanName );
+        return _formBeans.get( formBeanName );
     }
 
     public FormBeanModel getFormBeanByActualType( String actualTypeName )
@@ -299,17 +284,11 @@
     public String getFormNameForType( String formType )
     {
         //
-        // First try and create a form-bean name that is a camelcased
-        // version of the classname without all of its package/outer-class
-        // qualifiers.  If one with that name already exists, munge the
-        // fully-qualified classname.
+        // First try and create a form-bean name that is a camelcased version of the classname without all of its
+        // package/outer-class qualifiers.  If one with that name already exists, munge the fully-qualified classname.
         //
         int lastQualifier = formType.lastIndexOf( '$' );
-
-        if ( lastQualifier == -1 )
-        {
-            lastQualifier = formType.lastIndexOf( '.' );
-        }
+        if ( lastQualifier == -1 ) lastQualifier = formType.lastIndexOf( '.' );
 
         String formBeanName = formType.substring( lastQualifier + 1 );
         formBeanName = Character.toLowerCase( formBeanName.charAt( 0 ) ) + formBeanName.substring( 1 );
@@ -325,7 +304,7 @@
             //
             // Now look for the one we're conflicting with 
             //
-            FormBeanModel conflictingBean = getFormBean( conflictingName );
+            FormBeanModel conflictingBean = _formBeans.get( conflictingName );
             
             if ( conflictingBean != null )
             {
@@ -336,13 +315,13 @@
                 //
                 // Now look for any action mappings that are using the conflicting name...
                 //
-                for ( int i = 0; i < _actionMappings.size(); ++i )
+                for ( Iterator<ActionModel> i = _actionMappings.values().iterator(); i.hasNext(); )
                 {
-                    ActionModel mapping = ( ActionModel ) _actionMappings.get( i );
+                    ActionModel mapping = i.next();
                     
-                    if ( mapping.getName() != null && mapping.getName().equals( conflictingName ) )
+                    if ( mapping.getFormBeanName() != null && mapping.getFormBeanName().equals( conflictingName ) )
                     {
-                        mapping.setName( nonConflictingName );
+                        mapping.setFormBeanName( nonConflictingName );
                     }
                 }
             }
@@ -358,92 +337,6 @@
         return formType.replace( '.', '_' ).replace( '$', '_' );
     }
 
-
-    /**
-     * <ol>
-     *   <li>Remove duplicate action mappings.</li>
-     *   <li>For action mappings that have the same pahts (but have different forms), add a comment.
-     *   <li>Sort the action mappings by path name.</li>
-     * </ol>
-     */ 
-    protected void sortActionMappings()
-    {
-        HashMap< String, ActionModel > alreadySeen = new HashMap< String, ActionModel >();
-        HashMap< String, ActionModel > dups = new HashMap< String, ActionModel >();
-        ArrayList toRemove = new ArrayList();
-        
-        for ( int i = 0; i < _actionMappings.size(); ++i )
-        {
-            ActionModel am = ( ActionModel ) _actionMappings.get( i );
-            String path = am.getPath( true );
-            
-            if ( alreadySeen.containsKey( path ) )
-            {
-                ActionModel dup = alreadySeen.get( path );
-                
-                if ( dup != null )
-                {
-                    assert ! dups.containsKey( dup.getPath() );
-                    dups.put( dup.getPath(), dup );
-                    alreadySeen.put( path, null );
-                    toRemove.add( dup );
-                }
-                
-                //
-                // If there are conflicting paths, choose the one with no form, or the one whose
-                // form name comes alphabetically first.
-                //
-                if ( ! dups.containsKey( am.getPath() ) )
-                {
-                    dups.put( am.getPath(), am ); 
-                }
-                else
-                {
-                    ActionModel existingDup = dups.get( am.getPath() );
-                    
-                    if ( am.getName() == null
-                         || ( existingDup.getName() != null
-                              && getFormQualifiedActionPath( am ).compareTo( getFormQualifiedActionPath( existingDup ) ) < 0 ) )
-                    {
-                        dups.put( am.getPath(), am );
-                    }
-                }
-                
-                toRemove.add( am );
-            }
-            else
-            {
-                alreadySeen.put( path, am );
-            }
-        }
-        
-        for ( int i = 0; i < toRemove.size(); ++i )
-        {
-            _actionMappings.remove( toRemove.get( i ) );
-        }
-        
-        //
-        // Create the list of overloaded actions, and add a comment on any overloaded action.
-        //
-        ArrayList dupsList = new ArrayList();
-        for ( Iterator i = dups.values().iterator(); i.hasNext(); )
-        {
-            ActionModel am = ( ActionModel ) i.next();
-            dupsList.add( am );
-            
-            String unqualifiedPath = am.getPath( true );
-            
-            if ( unqualifiedPath.equals( am.getPath( false ) ) )
-            {
-                am.setComment( DUPLICATE_ACTION_COMMENT.replaceAll( "\\{0\\}", unqualifiedPath ) );  // @TODO I18N
-                am.setOverloaded( true );
-            }
-        }
-        
-        _actionMappings.addAll( dupsList );
-        Collections.sort( _actionMappings, new ActionMappingComparator() );
-    }
-    
     protected static class ActionMappingComparator implements Comparator
     {
         public int compare( Object o1, Object o2 )
@@ -473,9 +366,12 @@
         return _exceptionCatches;
     }
     
-    protected List getActionMappingsList()
+    protected List< ActionModel > getSortedActionMappings()
     {
-        return _actionMappings;
+        ArrayList< ActionModel > sortedActionMappings = new ArrayList< ActionModel >();
+        sortedActionMappings.addAll( _actionMappings.values() );
+        Collections.sort( sortedActionMappings, new ActionMappingComparator() );
+        return sortedActionMappings;
     }
     
     protected List< MessageResourcesModel > getMessageResourcesList()
@@ -560,7 +456,6 @@
             scElement = doc.addNewStrutsConfig();
         }
         
-        
         //
         // Write the "generated by" comment.
         //
@@ -568,7 +463,6 @@
         String headerComment = getHeaderComment( mergeFile );
         if ( headerComment != null ) curs.insertComment( headerComment );
         
-        
         //
         // form-beans
         //
@@ -662,7 +556,6 @@
     
     private void writeActionMappings( StrutsConfigDocument.StrutsConfig scElement )
     {
-        sortActionMappings();        
         ActionMappingsDocument.ActionMappings actionMappings = scElement.getActionMappings();
         
         if ( actionMappings == null )
@@ -671,7 +564,7 @@
         }
         
         ActionDocument.Action[] existingActions = actionMappings.getActionArray();
-        List actionMappingsList = getActionMappingsList();
+        List actionMappingsList = getSortedActionMappings();
         
         for ( int i = 0; i < actionMappingsList.size(); ++i )
         {

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FacesBackingBeanFactory.java
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FacesBackingBeanFactory.java	(original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FacesBackingBeanFactory.java	Tue Nov  9 16:03:33 2004
@@ -57,8 +57,7 @@
             try
             {
                 Class backingClass =
-                    ContextCache.get( servletContext ).getReloadableClassHandler().loadCachedClass( backingClassName,
-                                                                                                    request );
+                    ContextCache.get( servletContext ).getReloadableClassHandler().loadCachedClass( backingClassName );
                 
                 if ( backingClass == null )
                 {

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowController.java
==============================================================================
--- 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	Tue Nov  9 16:03:33 2004
@@ -51,6 +51,7 @@
 import java.io.IOException;
 import java.lang.reflect.Method;
 import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Field;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.Locale;
@@ -1509,22 +1510,24 @@
 
     /**
      * Generate a new transaction token, to be used for enforcing a single request for a particular transaction.
-     * @deprecated Use
      *
      * @param request the current request.
+     * @deprecated Use
      */
-    protected String generateToken(HttpServletRequest request) {
-        return TOKEN_PROCESSOR.generateToken(request);
+    protected String generateToken( HttpServletRequest request )
+    {
+        return TOKEN_PROCESSOR.generateToken( request );
     }
-    
+
     /**
      * Return the default data source for the module associated with this page flow.
      *
      * @param request the current request.
      */
-    protected DataSource getDataSource(HttpServletRequest request) {
+    protected DataSource getDataSource( HttpServletRequest request )
+    {
 
-        return getDataSource(request, Globals.DATA_SOURCE_KEY);
+        return getDataSource( request, Globals.DATA_SOURCE_KEY );
 
     }
 
@@ -1532,67 +1535,79 @@
      * Return the specified data source for the current module.
      *
      * @param request The servlet request we are processing
-     * @param key The key specified in the
-     *  <code>&lt;message-resources&gt;</code> element for the
-     *  requested bundle
+     * @param key     The key specified in the
+     *                <code>&lt;message-resources&gt;</code> element for the
+     *                requested bundle
      */
-    protected DataSource getDataSource(HttpServletRequest request, String key) {
+    protected DataSource getDataSource( HttpServletRequest request, String key )
+    {
 
         ModuleConfig moduleConfig = getModuleConfig();
 
         // Return the requested data source instance
-        return (DataSource) getServletContext().getAttribute( key + moduleConfig.getPrefix() );
+        return ( DataSource ) getServletContext().getAttribute( key + moduleConfig.getPrefix() );
 
     }
 
 
     /**
      * Return the user's currently selected Locale.
-     * @deprecated Use {@link #getLocale()}.
-     * 
+     *
      * @param request the current request.
      * @return the user's currently selected Locale, stored in the session.
+     * @deprecated Use {@link #getLocale()}.
      */
-    protected Locale getLocale(HttpServletRequest request) {
+    protected Locale getLocale( HttpServletRequest request )
+    {
 
         HttpSession session = request.getSession();
-        Locale locale = (Locale) session.getAttribute(Globals.LOCALE_KEY);
+        Locale locale = ( Locale ) session.getAttribute( Globals.LOCALE_KEY );
         return locale != null ? locale : DEFAULT_LOCALE;
     }
-    
+
     /**
      * Return the user's currently selected Locale.
-     * 
+     *
      * @return the user's currently selected Locale, stored in the session.
-     */ 
+     */
     protected Locale getLocale()
     {
-        Locale locale = (Locale) getSession().getAttribute(Globals.LOCALE_KEY);
+        Locale locale = ( Locale ) getSession().getAttribute( Globals.LOCALE_KEY );
         return locale != null ? locale : DEFAULT_LOCALE;
     }
 
     public static Locale retrieveUserLocale( HttpServletRequest request, String locale )
     {
-        if ( locale == null ) locale = Globals.LOCALE_KEY;
+        if ( locale == null )
+        {
+            locale = Globals.LOCALE_KEY;
+        }
         HttpSession session = request.getSession( false );
         Locale userLocale = null;
-        if ( session != null ) userLocale = ( Locale ) session.getAttribute( locale );        
-        if ( userLocale == null ) userLocale = DEFAULT_LOCALE;
+        if ( session != null )
+        {
+            userLocale = ( Locale ) session.getAttribute( locale );
+        }
+        if ( userLocale == null )
+        {
+            userLocale = DEFAULT_LOCALE;
+        }
         return userLocale;
     }
-    
+
 
     /**
      * Return the message resources for the default module.
      *
      * @deprecated This method can only return the resources for the default
-     *  module.  Use getResources(HttpServletRequest) to get the
-     *  resources for the current module.
+     *             module.  Use getResources(HttpServletRequest) to get the
+     *             resources for the current module.
      */
-    protected MessageResources getResources() {
+    protected MessageResources getResources()
+    {
 
-        return (MessageResources)
-                getServletContext().getAttribute(Globals.MESSAGES_KEY);
+        return ( MessageResources )
+                getServletContext().getAttribute( Globals.MESSAGES_KEY );
 
     }
 
@@ -1602,30 +1617,30 @@
      *
      * @param request The servlet request we are processing
      */
-    protected MessageResources getResources(HttpServletRequest request) {
+    protected MessageResources getResources( HttpServletRequest request )
+    {
 
-        return ((MessageResources) request.getAttribute(Globals.MESSAGES_KEY));
+        return ( ( MessageResources ) request.getAttribute( Globals.MESSAGES_KEY ) );
 
     }
 
 
-
     /**
      * Return the specified message resources for the current module.
      *
      * @param request the current request.
-     * @param key The bundle key specified in a
-     *            {@link Jpf.MessageResource} annotation.
-     *  <code>&lt;message-resources&gt;</code> element for the
-     *  requested bundle
-     *
+     * @param key     The bundle key specified in a
+     *                {@link Jpf.MessageResource} annotation.
+     *                <code>&lt;message-resources&gt;</code> element for the
+     *                requested bundle
      * @since Struts 1.1
      */
-    protected MessageResources getResources(HttpServletRequest request,
-                                            String key) {
+    protected MessageResources getResources( HttpServletRequest request,
+                                             String key )
+    {
 
-        return ((MessageResources) getServletContext().getAttribute
-                (key + getModuleConfig().getPrefix()));
+        return ( ( MessageResources ) getServletContext().getAttribute
+                ( key + getModuleConfig().getPrefix() ) );
 
     }
 
@@ -1641,9 +1656,10 @@
      * @param request The servlet request we are processing
      * @see org.apache.struts.taglib.html.CancelTag
      */
-    protected boolean isCancelled(HttpServletRequest request) {
+    protected boolean isCancelled( HttpServletRequest request )
+    {
 
-        return (request.getAttribute(Globals.CANCEL_KEY) != null);
+        return ( request.getAttribute( Globals.CANCEL_KEY ) != null );
 
     }
 
@@ -1658,14 +1674,15 @@
      * <li>No transaction token saved in the session</li>
      * <li>No transaction token included as a request parameter</li>
      * <li>The included transaction token value does not match the
-     *     transaction token in the user's session</li>
+     * transaction token in the user's session</li>
      * </ul>
      *
      * @param request The servlet request we are processing
      */
-    protected boolean isTokenValid(HttpServletRequest request) {
+    protected boolean isTokenValid( HttpServletRequest request )
+    {
 
-        return TOKEN_PROCESSOR.isTokenValid(request, false);
+        return TOKEN_PROCESSOR.isTokenValid( request, false );
 
     }
 
@@ -1679,17 +1696,17 @@
      * <li>No transaction token saved in the session</li>
      * <li>No transaction token included as a request parameter</li>
      * <li>The included transaction token value does not match the
-     *     transaction token in the user's session</li>
+     * transaction token in the user's session</li>
      * </ul>
      *
      * @param request The servlet request we are processing
-     * @param reset Should we reset the token after checking it?
+     * @param reset   Should we reset the token after checking it?
      */
-    protected boolean isTokenValid(
-        HttpServletRequest request,
-        boolean reset) {
+    protected boolean isTokenValid( HttpServletRequest request,
+                                    boolean reset )
+    {
 
-        return TOKEN_PROCESSOR.isTokenValid(request, reset);
+        return TOKEN_PROCESSOR.isTokenValid( request, reset );
     }
 
 
@@ -1700,8 +1717,9 @@
      *
      * @param request The servlet request we are processing
      */
-    protected void resetToken(HttpServletRequest request) {
-        TOKEN_PROCESSOR.resetToken(request);
+    protected void resetToken( HttpServletRequest request )
+    {
+        TOKEN_PROCESSOR.resetToken( request );
     }
 
 
@@ -1712,19 +1730,21 @@
      * created.
      *
      * @param request The servlet request we are processing
-     * @param errors Error messages object
+     * @param errors  Error messages object
      */
-    protected void saveErrors(HttpServletRequest request,
-                  ActionErrors errors) {
+    protected void saveErrors( HttpServletRequest request,
+                               ActionErrors errors )
+    {
 
         // Remove any error messages attribute if none are required
-        if (errors == null || errors.isEmpty()) {
-            request.removeAttribute(Globals.ERROR_KEY);
+        if ( errors == null || errors.isEmpty() )
+        {
+            request.removeAttribute( Globals.ERROR_KEY );
             return;
         }
 
         // Save the error messages we need
-        request.setAttribute(Globals.ERROR_KEY, errors);
+        request.setAttribute( Globals.ERROR_KEY, errors );
 
     }
 
@@ -1735,21 +1755,23 @@
      * messages="true" is set), if any messages are required.  Otherwise,
      * ensure that the request attribute is not created.
      *
-     * @param request   The servlet request we are processing
-     * @param messages  Messages object
+     * @param request  The servlet request we are processing
+     * @param messages Messages object
      * @since Struts 1.1
      */
-    protected void saveMessages(HttpServletRequest request,
-                    ActionMessages messages) {
+    protected void saveMessages( HttpServletRequest request,
+                                 ActionMessages messages )
+    {
 
         // Remove any messages attribute if none are required
-        if (messages == null || messages.isEmpty()) {
-            request.removeAttribute(Globals.MESSAGE_KEY);
+        if ( messages == null || messages.isEmpty() )
+        {
+            request.removeAttribute( Globals.MESSAGE_KEY );
             return;
         }
 
         // Save the messages we need
-        request.setAttribute(Globals.MESSAGE_KEY, messages);
+        request.setAttribute( Globals.MESSAGE_KEY, messages );
 
     }
 
@@ -1760,32 +1782,67 @@
      *
      * @param request The servlet request we are processing
      */
-    protected void saveToken(HttpServletRequest request) {
-        TOKEN_PROCESSOR.saveToken(request);
+    protected void saveToken( HttpServletRequest request )
+    {
+        TOKEN_PROCESSOR.saveToken( request );
     }
 
 
     /**
      * Set the user's currently selected Locale.
-     * @deprecated Use {@link #setLocale(java.util.Locale)}. 
      *
      * @param request The request we are processing
-     * @param locale The user's selected Locale to be set, or null
-     *  to select the server's default Locale
+     * @param locale  The user's selected Locale to be set, or null
+     *                to select the server's default Locale
+     * @deprecated Use {@link #setLocale(java.util.Locale)}.
      */
-    protected void setLocale(HttpServletRequest request, Locale locale) {
+    protected void setLocale( HttpServletRequest request, Locale locale )
+    {
 
         HttpSession session = request.getSession();
-        if (locale == null) {
+        if ( locale == null )
+        {
             locale = getDefaultLocale();
         }
-        session.setAttribute(Globals.LOCALE_KEY, locale);
+        session.setAttribute( Globals.LOCALE_KEY, locale );
 
     }
-    
+
     protected void setLocale( Locale locale )
     {
-        if ( locale == null ) locale = getDefaultLocale();
+        if ( locale == null )
+        {
+            locale = getDefaultLocale();
+        }
         getSession().setAttribute( Globals.LOCALE_KEY, locale );
+    }
+    
+    /**
+     * Get the page flow-scoped form bean member associated with the given ActionMapping.
+     * @exclude
+     */ 
+    public ActionForm getFormBean( ActionMapping mapping )
+    {
+        if ( mapping instanceof PageFlowActionMapping )
+        {
+            PageFlowActionMapping pfam = ( PageFlowActionMapping ) mapping;
+            String formMember = pfam.getFormMember();
+            
+            try
+            {
+                if ( formMember != null )
+                {
+                    Field field = getClass().getDeclaredField( formMember );
+                    field.setAccessible( true );
+                    return InternalUtils.wrapFormBean( field.get( this ) );
+                }
+            }
+            catch ( Exception e )
+            {
+                _log.error( "Could not use page flow member " + formMember + " as the form bean.", e );
+            }
+        }
+        
+        return null;
     }
 }

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/Forward.java
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/Forward.java	(original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/Forward.java	Tue Nov  9 16:03:33 2004
@@ -277,7 +277,12 @@
      */ 
     public final void addOutputForm( Object formBean )
     {
-        assert formBean != null;
+        assert formBean != null : "The output form bean may not me null.";
+        
+        if ( formBean == null )
+        {
+            throw new IllegalArgumentException( "The output form bean may not be null." );
+        }
         
         if ( _outputForms == null )
         {
@@ -322,7 +327,7 @@
                     
                     ServletContext servletContext = InternalUtils.getServletContext( request );
                     ReloadableClassHandler rch = ContextCache.get( servletContext ).getReloadableClassHandler();
-                    Object formBean = rch.newInstance( _returnFormType, request );
+                    Object formBean = rch.newInstance( _returnFormType );
                     ActionForm wrappedFormBean = InternalUtils.wrapFormBean( formBean );
                     addOutputForm( wrappedFormBean );
                     return wrappedFormBean;

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowRequestProcessor.java
==============================================================================
--- 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	Tue Nov  9 16:03:33 2004
@@ -24,6 +24,7 @@
 import org.apache.struts.action.ActionForward;
 import org.apache.struts.action.DynaActionFormClass;
 import org.apache.struts.action.DynaActionForm;
+import org.apache.struts.action.ActionServlet;
 import org.apache.struts.config.ActionConfig;
 import org.apache.struts.config.ForwardConfig;
 import org.apache.struts.config.FormBeanConfig;
@@ -45,6 +46,8 @@
 import java.util.Map;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.List;
+import java.util.ArrayList;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.lang.reflect.Field;
@@ -58,18 +61,19 @@
 import org.apache.beehive.netui.pageflow.util.URLRewriterService;
 import org.apache.beehive.netui.pageflow.config.PageFlowActionForward;
 import org.apache.beehive.netui.pageflow.config.PageFlowActionMapping;
+import org.apache.beehive.netui.pageflow.config.PageFlowActionFormBean;
 import org.apache.beehive.netui.pageflow.interceptor.ActionInterceptorChain;
 import org.apache.beehive.netui.pageflow.interceptor.InterceptorForward;
 import org.apache.beehive.netui.pageflow.internal.ContextCache;
 import org.apache.beehive.netui.pageflow.internal.RequestValues;
 import org.apache.beehive.netui.pageflow.internal.InternalUtils;
 import org.apache.beehive.netui.pageflow.internal.FlowControllerAction;
-import org.apache.beehive.netui.pageflow.internal.InternalConstants;
 import org.apache.beehive.netui.pageflow.internal.DeferredPageFlowException;
 import org.apache.beehive.netui.pageflow.scoping.ScopedServletUtils;
 import org.apache.beehive.netui.pageflow.scoping.ScopedRequest;
 import org.apache.beehive.netui.pageflow.handler.ForwardRedirectHandler;
 import org.apache.beehive.netui.pageflow.handler.LoginHandler;
+import org.apache.beehive.netui.pageflow.handler.ReloadableClassHandler;
 
 import static org.apache.beehive.netui.pageflow.internal.InternalConstants.*;
 import static org.apache.beehive.netui.pageflow.PageFlowConstants.*;
@@ -100,6 +104,9 @@
     private static final String PAGEFLOW_SCOPED_FORM_NAME_ATTR = ATTR_PREFIX + "pageFlowScopedFormName";
     private static final String FLOW_CONTROLLER_ACTION_CLASSNAME = FlowControllerAction.class.getName();
     
+    private Map< String, Class > _formBeanClasses = new HashMap< String, Class >();
+    private Map< String, List< ActionMapping > > _overloadedActions = new HashMap< String, List< ActionMapping > >();
+    
 
     protected Action processActionCreate( HttpServletRequest request, HttpServletResponse response,
                                           ActionMapping actionMapping )
@@ -841,33 +848,40 @@
         }
     }
     
-    /**
-     * Same as makeFullyQualifiedBeanName in StrutsApp.java (compiler-side, can't share code).
-     */ 
-    private static String makeFullyQualifiedBeanName( String formType )
+    private boolean isCorrectFormType( Class formBeanClass, ActionMapping mapping )
     {
-        return formType.replace( '.', '_' ).replace( '$', '_' );
+        assert mapping.getName() != null : "cannot pass an ActionMapping that has no form bean";
+        Class cachedFormBeanClass = _formBeanClasses.get( mapping.getName() );
+        return isCorrectFormType( formBeanClass, cachedFormBeanClass, mapping );
     }
     
-    private boolean isCorrectFormType( String formClassName, ActionMapping mapping )
+    private boolean isCorrectFormType( Class formBeanClass, Class actionMappingFormBeanClass, ActionMapping mapping )
     {
-        FormBeanConfig mappingFormBean = moduleConfig.findFormBeanConfig( mapping.getName() );
-        
-        if ( mappingFormBean != null && mappingFormBean.getType().equals( formClassName ) ) return true;
-        
-        //
-        // Check to see if this is a non-ActionForm-derived type, and if so, if the typename is correct.
-        //
-        if ( mapping instanceof PageFlowActionMapping )
+        if ( actionMappingFormBeanClass != null )
         {
-            String desiredType = ( ( PageFlowActionMapping ) mapping ).getFormClass();
-            if ( formClassName.equals( desiredType ) ) return true;
+            return actionMappingFormBeanClass .isAssignableFrom( formBeanClass );
+        }
+        else
+        {
+            //
+            // The form bean class couldn't be loaded at init time -- just check against the class name.
+            //
+            FormBeanConfig mappingFormBean = moduleConfig.findFormBeanConfig( mapping.getName() );
+            String formClassName = formBeanClass.getName();
+            
+            if ( mappingFormBean != null && mappingFormBean.getType().equals( formClassName ) ) return true;
+            
+            if ( mapping instanceof PageFlowActionMapping )
+            {
+                String desiredType = ( ( PageFlowActionMapping ) mapping ).getFormClass();
+                if ( formClassName.equals( desiredType ) ) return true;
+            }
         }
         
         return false;
     }
     
-    private void checkTransaction( HttpServletRequest request, ActionMapping mapping )
+    private static void checkTransaction( HttpServletRequest request, ActionMapping mapping )
     {
         //
         // TODO: We haven't yet hooked up the support for marking an action as preventDoublePost=true.
@@ -881,6 +895,81 @@
             }
         }
     }
+   
+    public void init( ActionServlet s, ModuleConfig mc )
+        throws ServletException
+    {
+        super.init( s, mc );
+        
+        //
+        // Cache a list of overloaded actions for each overloaded action path (actions are overloaded by form bean type).
+        //
+        cacheOverloadedActionMappings();
+        
+        //
+        // Cache the form bean Classes by form bean name.
+        //
+        cacheFormClasses();
+    }
+    
+    private void cacheOverloadedActionMappings()
+    {
+        ActionConfig[] actionConfigs = moduleConfig.findActionConfigs();
+        
+        for ( int i = 0; i < actionConfigs.length; i++ )
+        {
+            ActionConfig actionConfig = actionConfigs[i];
+            
+            if ( actionConfig instanceof PageFlowActionMapping )
+            {
+                PageFlowActionMapping mapping = ( PageFlowActionMapping ) actionConfig;
+                String unqualifiedActionPath = ( ( PageFlowActionMapping ) actionConfig ).getUnqualifiedActionPath();
+                
+                if ( unqualifiedActionPath != null )
+                {
+                    List< ActionMapping > overloaded = _overloadedActions.get( unqualifiedActionPath );
+                    
+                    if ( overloaded == null )
+                    {
+                        overloaded = new ArrayList< ActionMapping >();
+                        _overloadedActions.put( unqualifiedActionPath, overloaded );
+                    }
+                    
+                    overloaded.add( mapping );
+                }
+            }
+        }
+    }
+    
+    private void cacheFormClasses()
+    {
+        FormBeanConfig[] formBeans = moduleConfig.findFormBeanConfigs();
+        ReloadableClassHandler rch = ContextCache.get( getServletContext() ).getReloadableClassHandler();
+        
+        for ( int i = 0; i < formBeans.length; i++ )
+        {
+            FormBeanConfig formBeanConfig = formBeans[i];
+            String formType = null;
+            
+            if ( formBeanConfig instanceof PageFlowActionFormBean )
+            {
+                formType = ( ( PageFlowActionFormBean ) formBeanConfig ).getActualType();
+            }
+            
+            if ( formType == null ) formType = formBeanConfig.getType();
+            
+            try
+            {
+                Class formBeanClass = rch.loadClass( formType );
+                _formBeanClasses.put( formBeanConfig.getName(), formBeanClass );
+            }
+            catch ( ClassNotFoundException e )
+            {
+                _log.error( "Could not load class " + formType + " referenced from form bean config "
+                            + formBeanConfig.getName() );
+            }
+        }
+    }
     
     public ActionMapping processMapping( HttpServletRequest request, HttpServletResponse response, String path )
         throws IOException
@@ -890,26 +979,48 @@
         // name, but different forms (in nesting).
         //
         Object forwardedForm = InternalUtils.unwrapFormBean( RequestValues.getForwardedForm( request, false ) );
-        String forwardedFormClassName = null;
+        Class forwardedFormClass = null;
         
         if ( forwardedForm != null )
         {
-            forwardedFormClassName = forwardedForm.getClass().getName();
-            String qualifiedPath = path + '_' + makeFullyQualifiedBeanName( forwardedFormClassName );
-            ActionMapping mapping = ( ActionMapping ) moduleConfig.findActionConfig( qualifiedPath );
+            forwardedFormClass = forwardedForm.getClass();
+            List< ActionMapping > possibleMatches = _overloadedActions.get( path );
+            ActionMapping bestMatch = null;
+            
+            //
+            // Troll through the overloaded actions for the given path.  Look for the one whose form bean class is
+            // exactly the class of the forwarded form; failing that, look for one that's assignable from the class
+            // of the forwarded form.
+            //
+            for ( int i = 0; possibleMatches != null && i < possibleMatches.size(); ++i )
+            {
+                ActionMapping possibleMatch = possibleMatches.get( i );
+                assert possibleMatch instanceof PageFlowActionMapping : possibleMatch.getClass();
+                Class cachedFormBeanClass = _formBeanClasses.get( possibleMatch.getName() );
+                
+                if ( forwardedFormClass.equals( cachedFormBeanClass ) )
+                {
+                    bestMatch = possibleMatch;
+                    break;
+                }
+                if ( bestMatch == null && isCorrectFormType( forwardedFormClass, possibleMatch ) )
+                {
+                    bestMatch = possibleMatch;
+                }
+            }
             
-            if ( mapping != null )
+            if ( bestMatch != null )
             {
-                request.setAttribute( Globals.MAPPING_KEY, mapping );
+                request.setAttribute( Globals.MAPPING_KEY, bestMatch );
                 
                 if ( _log.isDebugEnabled() )
                 {
-                    _log.debug( "Found form-specific action mapping " + qualifiedPath + " for " + path
-                               + ", form " + forwardedFormClassName );
+                    _log.debug( "Found form-specific action mapping " + bestMatch.getPath() + " for " + path
+                                + ", form " + forwardedFormClass.getName() );
                 }
                 
-                checkTransaction( request, mapping );
-                return mapping;
+                checkTransaction( request, bestMatch );
+                return bestMatch;
             }
         }
         
@@ -923,17 +1034,12 @@
             boolean wrongForm = false;
             
             //
-            // We're going to bail out if there is a returningForm and the selected mapping
-            // requires a different form type.
+            // We're going to bail out if there is a forwarded form and this mapping requires a different form type.
             //
             if ( forwardedForm != null )
             {
-                String mappingFormName = mapping.getName();
-                
-                if ( mappingFormName == null || ! isCorrectFormType( forwardedFormClassName, mapping ) )
-                {
-                    wrongForm = true;
-                }
+                boolean mappingHasNoFormBean = mapping.getName() == null;
+                wrongForm = mappingHasNoFormBean || ! isCorrectFormType( forwardedFormClass, mapping );
             }
             
             if ( ! wrongForm )
@@ -1224,8 +1330,8 @@
                     // First, see if the current module is a Shared Flow module.  If so, we need to translate the local
                     // path so it makes sense (strip off the shared flow module prefix "/-" and replace it with "/").
                     //
-                    ModuleConfig moduleConfig = ( ModuleConfig ) request.getAttribute( Globals.MODULE_KEY );
-                    if ( InternalUtils.isSharedFlowModule( moduleConfig )
+                    ModuleConfig mc = ( ModuleConfig ) request.getAttribute( Globals.MODULE_KEY );
+                    if ( InternalUtils.isSharedFlowModule( mc )
                          && fwdURI.startsWith( SHARED_FLOW_MODULE_PREFIX ) )
                     {
                         fwdURI = '/' + fwdURI.substring( SHARED_FLOW_MODULE_PREFIX_LEN );

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/annotations/Jpf.java
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/annotations/Jpf.java	(original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/annotations/Jpf.java	Tue Nov  9 16:03:33 2004
@@ -403,7 +403,7 @@
     {
         String name();
         Class type();
-        String typeHint();
+        String typeHint() default "";
         boolean required() default true;
         /** @deprecated Use {@link #required}. **/
         boolean nullable() default false;

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/handler/ReloadableClassHandler.java
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/handler/ReloadableClassHandler.java	(original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/handler/ReloadableClassHandler.java	Tue Nov  9 16:03:33 2004
@@ -26,13 +26,13 @@
 public interface ReloadableClassHandler
         extends Handler
 {
-    Object newInstance( String className, HttpServletRequest request )
+    Object newInstance( String className )
         throws ClassNotFoundException, InstantiationException, IllegalAccessException;
 
-    Class loadClass( String className, HttpServletRequest request )
+    Class loadClass( String className )
         throws ClassNotFoundException;
 
-    Class loadCachedClass( String className, HttpServletRequest request );
+    Class loadCachedClass( String className );
     
     void reinit( HttpServletRequest request );
 

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/AnyBeanActionForm.java
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/AnyBeanActionForm.java	(original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/AnyBeanActionForm.java	Tue Nov  9 16:03:33 2004
@@ -68,7 +68,7 @@
             {
                 ReloadableClassHandler reloadableHandler =
                         ContextCache.get( getServlet().getServletContext() ).getReloadableClassHandler();
-                _bean = reloadableHandler.newInstance( formClass, request );
+                _bean = reloadableHandler.newInstance( formClass );
             }
             catch ( Exception e )
             {
@@ -87,8 +87,8 @@
         assert _bean != null;
         assert mapping instanceof PageFlowActionMapping : mapping.getClass().getName();
         
-        String beanClassName = ( ( PageFlowActionMapping ) mapping ).getAttribute();
-        ActionErrors errors = validateBean( _bean, beanClassName, mapping, request );
+        String beanName = ( ( PageFlowActionMapping ) mapping ).getAttribute();
+        ActionErrors errors = validateBean( _bean, beanName, mapping, request );
         
         if ( _bean instanceof Validatable )
         {

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/DefaultReloadableClassHandler.java
==============================================================================
--- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/DefaultReloadableClassHandler.java	(original)
+++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/DefaultReloadableClassHandler.java	Tue Nov  9 16:03:33 2004
@@ -28,7 +28,6 @@
 import javax.servlet.http.HttpSession;
 import javax.servlet.ServletContext;
 import java.util.Enumeration;
-import java.util.HashMap;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 import java.io.File;
@@ -63,17 +62,17 @@
         }
     }
     
-    public Object newInstance( String className, HttpServletRequest request )
+    public Object newInstance( String className )
         throws ClassNotFoundException, InstantiationException, IllegalAccessException
     {
-        return loadClass( className, request ).newInstance();
+        return loadClass( className ).newInstance();
     }
     
     private static Map< String, Class > _loadedClasses = new ConcurrentHashMap< String, Class >();
     private static class Null {}
     private static Class NULL_CLASS = Null.class;
     
-    public Class loadCachedClass( String className, HttpServletRequest request )
+    public Class loadCachedClass( String className )
     {
         Class clazz = _loadedClasses.get( className );
         
@@ -85,7 +84,7 @@
         {
             try
             {
-                clazz = loadClass( className, request );
+                clazz = loadClass( className );
                 _loadedClasses.put( className, clazz );
                 return clazz;
             }
@@ -97,7 +96,7 @@
         }
     }
     
-    public Class loadClass( String className, HttpServletRequest request )
+    public Class loadClass( String className )
         throws ClassNotFoundException
     {
         if ( _pageFlowClassLoader != null )

Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/InternalUtils.java
==============================================================================
--- 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	Tue Nov  9 16:03:33 2004
@@ -20,6 +20,7 @@
 import org.apache.beehive.netui.pageflow.*;
 import org.apache.beehive.netui.pageflow.handler.ReloadableClassHandler;
 import org.apache.beehive.netui.pageflow.config.PageFlowControllerConfig;
+import org.apache.beehive.netui.pageflow.config.PageFlowActionMapping;
 import org.apache.beehive.netui.pageflow.scoping.ScopedServletUtils;
 import org.apache.beehive.netui.util.logging.Logger;
 import org.apache.beehive.netui.util.Bundle;
@@ -36,6 +37,7 @@
 import java.io.IOException;
 import java.io.PrintStream;
 import java.lang.reflect.Method;
+import java.lang.reflect.Field;
 import java.util.Map;
 import java.util.Iterator;
 import java.util.HashMap;
@@ -48,6 +50,9 @@
 import org.apache.struts.action.ActionErrors;
 import org.apache.struts.action.ActionMapping;
 import org.apache.struts.action.ActionServlet;
+import org.apache.struts.action.DynaActionFormClass;
+import org.apache.struts.action.DynaActionForm;
+import org.apache.struts.action.Action;
 import org.apache.struts.config.ModuleConfig;
 import org.apache.struts.config.ControllerConfig;
 import org.apache.struts.config.FormBeanConfig;
@@ -482,7 +487,7 @@
         throws ClassNotFoundException
     {
         ReloadableClassHandler handler = ContextCache.get( servletContext ).getReloadableClassHandler();
-        return handler.loadClass( className, request );
+        return handler.loadClass( className );
     }
     
     public static Map getActionOutputMap( ServletRequest request, boolean createIfNotExist )
@@ -667,12 +672,35 @@
                                                ServletContext servletContext )
     {
         String formName = mapping.getName();
-        FormBeanConfig config = moduleConfig.findFormBeanConfig(formName);
-        if (config == null) return null;
+        if ( formName == null ) return null;
+        FormBeanConfig config = moduleConfig.findFormBeanConfig( formName );
+        if ( config == null ) return null;
         
         try
         {
-            ActionForm bean = ( ActionForm ) newReloadableInstance( config.getType(), request, servletContext );
+            ActionForm bean;
+            
+            if ( config.getDynamic() )
+            {
+                if ( _log.isDebugEnabled() )
+                {
+                    _log.debug( "Creating new DynaActionForm instance of type " + config.getType() );
+                }
+                
+                DynaActionFormClass dynaClass = DynaActionFormClass.createDynaActionFormClass( config );
+                bean = ( ActionForm ) dynaClass.newInstance();
+                ( ( DynaActionForm ) bean ).initialize( mapping );
+            }
+            else
+            {
+                if ( _log.isDebugEnabled() )
+                {
+                    _log.debug( "Creating new ActionForm instance of type " + config.getType() );
+                }
+                
+                bean = ( ActionForm ) newReloadableInstance( config.getType(), request, servletContext );
+            }
+            
             bean.setServlet( actionServlet );
             return bean;
         }
@@ -953,4 +981,6 @@
         assert request.getSession( false ) != null : "getServletContext() called before session created";
         return request.getSession( true ).getServletContext();
     }
+    
+
 }

Modified: incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Form.java
==============================================================================
--- incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Form.java	(original)
+++ incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Form.java	Tue Nov  9 16:03:33 2004
@@ -21,6 +21,7 @@
 import org.apache.beehive.netui.pageflow.PageFlowController;
 import org.apache.beehive.netui.pageflow.PageFlowUtils;
 import org.apache.beehive.netui.pageflow.SharedFlowController;
+import org.apache.beehive.netui.pageflow.FlowController;
 import org.apache.beehive.netui.pageflow.internal.ContextCache;
 import org.apache.beehive.netui.pageflow.internal.InternalUtils;
 import org.apache.beehive.netui.pageflow.util.PageflowTagUtils;
@@ -215,6 +216,7 @@
     private HashMap _focusMap;
     private ArrayList _idList = null;
     private ModuleConfig _appConfig = null;        // The application configuration for our module.
+    private FlowController _flowController = null; // The flow controller (page flow or shared flow).
     private boolean _setRealName = false;
     private boolean _formSubmit = false;
     private Map _params;
@@ -601,7 +603,7 @@
                 // Backwards compatibility - use explicitly specified values
                 try {
                     ContextCache cc = ContextCache.get(pageContext.getServletContext());
-                    bean = cc.getReloadableClassHandler().newInstance(_beanType, request);
+                    bean = cc.getReloadableClassHandler().newInstance(_beanType);
                     if (bean != null) {
                         ((ActionForm) bean).setServlet(_servlet);
                     }
@@ -612,7 +614,15 @@
             }
             else {
                 // New and improved - use the values from the action mapping
-                bean = RequestUtils.createActionForm(request, _mapping, _appConfig, _servlet);
+                
+                //
+                // First, check to see if this is a page flow-scoped form bean.  If so, use the current value
+                // from the member field in the page flow (or shared flow).
+                //
+                if (_flowController != null) {
+                    bean = _flowController.getFormBean(_mapping);
+                }
+                
                 if (bean == null) {
                     bean = InternalUtils.createActionForm(request, _mapping, _appConfig, _servlet,
                             servletContext);
@@ -859,6 +869,7 @@
         if (_idList != null)
             _idList.clear();
         _appConfig = null;
+        _flowController = null;
         _setRealName = false;
         _formSubmit = false;
         _params = null;
@@ -884,6 +895,7 @@
             return;
         }
         _servlet = (ActionServlet) servletContext.getAttribute(Globals.ACTION_SERVLET_KEY);
+        _flowController = PageFlowUtils.getCurrentPageFlow(request);
 
         // check to see if this is a bad action
         boolean isAction = PageflowTagUtils.isAction(request, response, servletContext, _state.action);
@@ -896,15 +908,8 @@
         // If the current module is a SharedFlowController module, then we'll first try the module
         // associated with the current pageflow.  Later we'll retry this one if necessary.
         if (InternalUtils.isSharedFlowModule(_appConfig)) {
-            PageFlowController curPgr = PageFlowUtils.getCurrentPageFlow(request);
-
-            if (curPgr != null) {
-                ModuleConfig curPgrModule = InternalUtils.getModuleConfig(curPgr.getModulePath(),
-                        servletContext);
-
-                if (curPgrModule != null) {
-                    _appConfig = curPgrModule;
-                }
+            if (_flowController != null) {
+                _appConfig = _flowController.getModuleConfig();
             }
         }
 
@@ -924,6 +929,7 @@
 
                 if (globalMapping != null) {
                     _appConfig = sharedFlowConfig;
+                    _flowController = sfc;
                     _mapping = globalMapping;
                 }
             }

Added: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/passToFromNested/PassToFromNestedController.jpf
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/passToFromNested/PassToFromNestedController.jpf	Tue Nov  9 16:03:33 2004
@@ -0,0 +1,119 @@
+package pageFlowCore.passToFromNested;
+
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+import pageFlowCore.passToFromNested.nested.NestedController;
+import pageFlowCore.passToFromNested.nested.NestedController.DataIn;
+
+
+@Jpf.Controller
+public class PassToFromNestedController extends PageFlowController
+{
+    @Jpf.Action(
+        forwards={
+           @Jpf.Forward(name="index", path="index.jsp")
+        }
+    )
+    protected Forward begin()
+    {
+        return new Forward("index");
+    }
+
+    @Jpf.Action(
+        forwards = {
+            @Jpf.Forward(
+                name = "success",
+                path = "nested/NestedController.jpf"
+            )
+        }
+    )
+    protected Forward passDataIn()
+    {
+        DataIn input = new DataIn(){ public String getMessage() { return "DataIn:hi"; } };
+        return new Forward( "success", input );
+    }
+
+    @Jpf.Action(
+        forwards = {
+            @Jpf.Forward(
+                name = "success",
+                path = "string_done.jsp",
+                actionOutputs = {
+                    @Jpf.ActionOutput(
+                        name = "string",
+                        type = java.lang.String.class)
+                }
+            )
+        }
+    )
+    protected Forward string_done( String string )
+    {
+        return new Forward( "success", "string", string );
+    }
+
+    @Jpf.Action(
+        forwards = {
+            @Jpf.Forward(
+                name = "success",
+                path = "dataIn_done.jsp",
+                actionOutputs = {
+                    @Jpf.ActionOutput(
+                        name = "message",
+                        type = java.lang.String.class
+                    )
+                }
+            )
+        }
+    )
+    protected Forward dataIn_done( NestedController.DataOut dataOut )
+    {
+        return new Forward( "success", "message", dataOut.getMessage() );
+    }
+
+    @Jpf.Action(
+        forwards = {
+            @Jpf.Forward(name = "success", path = "nested/NestedController.jpf")
+        }
+    )
+    protected Forward passString()
+    {
+        Forward forward = new Forward("success", "String:hi");
+        return forward;
+    }
+}
+
+@Jpf.ViewProperties(value = {
+    "<!-- This data is auto-generated. Hand-editing this section is not recommended. -->",
+    "<view-properties>",
+    "<pageflow-object id='pageflow:/pageFlowCore/passToFromNested/PassToFromNestedController.jpf'/>",
+    "<pageflow-object id='page:dataIn_done.jsp'><property name='x' value='240'/><property name='y' value='680'/></pageflow-object>",
+    "<pageflow-object id='page:index.jsp'><property value='400' name='x'/><property value='180' name='y'/></pageflow-object>",
+    "<pageflow-object id='page:string_done.jsp'><property name='x' value='560'/><property name='y' value='680'/></pageflow-object>",
+    "<pageflow-object id='action:begin.do'><property value='400' name='x'/><property value='60' name='y'/></pageflow-object>",
+    "<pageflow-object id='action:passDataIn.do'><property name='x' value='240'/><property name='y' value='180'/></pageflow-object>",
+    "<pageflow-object id='action:string_done.do#java.lang.String'><property name='x' value='560'/><property name='y' value='540'/></pageflow-object>",
+    "<pageflow-object id='action:dataIn_done.do#pageFlowCore.passToFromNested.nested.NestedController.DataOut'><property name='x' value='240'/><property name='y' value='540'/></pageflow-object>",
+    "<pageflow-object id='action:passString.do'><property name='x' value='560'/><property name='y' value='180'/></pageflow-object>",
+    "<pageflow-object id='formbean:java.lang.String'/>",
+    "<pageflow-object id='formbean:pageFlowCore.passToFromNested.nested.NestedController.DataOut'/>",
+    "<pageflow-object id='forward:path#index#index.jsp#@action:begin.do@'><property value='400,400,400,400' name='elbowsX'/><property value='104,120,120,136' name='elbowsY'/><property value='South_1' name='fromPort'/><property value='North_1' name='toPort'/><property value='index' name='label'/></pageflow-object>",
+    "<pageflow-object id='external-jpf:nested/NestedController.jpf'><property name='x' value='240'/><property name='y' value='380'/></pageflow-object>",
+    "<pageflow-object id='action-call:@external-jpf:nested/NestedController.jpf@#@action:string_done.do#java.lang.String@'><property name='elbowsX' value='276,400,400,524'/><property name='elbowsY' value='372,372,532,532'/><property name='fromPort' value='East_1'/><property name='toPort' value='West_1'/></pageflow-object>",
+    "<pageflow-object id='action-call:@external-jpf:nested/NestedController.jpf@#@action:dataIn_done.do#pageFlowCore.passToFromNested.nested.NestedController.DataOut@'><property name='elbowsX' value='240,240,240,240'/><property name='elbowsY' value='424,460,460,496'/><property name='fromPort' value='South_1'/><property name='toPort' value='North_1'/></pageflow-object>",
+    "<pageflow-object id='forward:path#success#nested/NestedController.jpf#@action:passDataIn.do@'><property name='elbowsX' value='240,240,240,240'/><property name='elbowsY' value='224,280,280,336'/><property name='fromPort' value='South_1'/><property name='toPort' value='North_1'/><property name='label' value='success'/></pageflow-object>",
+    "<pageflow-object id='forward:path#success#string_done.jsp#@action:string_done.do#java.lang.String@'><property name='elbowsX' value='560,560,560,560'/><property name='elbowsY' value='584,610,610,636'/><property name='fromPort' value='South_1'/><property name='toPort' value='North_1'/><property name='label' value='success'/></pageflow-object>",
+    "<pageflow-object id='forward:path#success#dataIn_done.jsp#@action:dataIn_done.do#pageFlowCore.passToFromNested.nested.NestedController.DataOut@'><property name='elbowsX' value='240,240,240,240'/><property name='elbowsY' value='584,610,610,636'/><property name='fromPort' value='South_1'/><property name='toPort' value='North_1'/><property name='label' value='success'/></pageflow-object>",
+    "<pageflow-object id='forward:path#success#nested/NestedController.jpf#@action:passString.do@'><property name='elbowsX' value='524,400,400,276'/><property name='elbowsY' value='183,183,361,361'/><property name='fromPort' value='West_2'/><property name='toPort' value='East_0'/><property name='label' value='success'/></pageflow-object>",
+    "<pageflow-object id='action-output:string#@forward:path#success#string_done.jsp#@action:string_done.do#java.lang.String@@'/>",
+    "<pageflow-object id='action-output:message#@forward:path#success#dataIn_done.jsp#@action:dataIn_done.do#pageFlowCore.passToFromNested.nested.NestedController.DataOut@@'/>",
+    "<pageflow-object id='external-jpf:/pageFlowCore/passToFromNested/nested/NestedController.jpf'><property name='x' value='560'/><property name='y' value='360'/></pageflow-object>",
+    "<pageflow-object id='action-call:@external-jpf:/pageFlowCore/passToFromNested/nested/NestedController.jpf@#@action:string_done.do#java.lang.String@'><property name='elbowsX' value='560,560,560,560'/><property name='elbowsY' value='404,450,450,496'/><property name='fromPort' value='South_1'/><property name='toPort' value='North_1'/></pageflow-object>",
+    "<pageflow-object id='action-call:@external-jpf:/pageFlowCore/passToFromNested/nested/NestedController.jpf@#@action:dataIn_done.do#pageFlowCore.passToFromNested.nested.NestedController.DataOut@'><property name='elbowsX' value='524,400,400,276'/><property name='elbowsY' value='363,363,532,532'/><property name='fromPort' value='West_2'/><property name='toPort' value='East_1'/></pageflow-object>",
+    "<pageflow-object id='action-call:@page:dataIn_done.jsp@#@action:begin.do@'><property name='elbowsX' value='276,320,320,364'/><property name='elbowsY' value='672,672,52,52'/><property name='fromPort' value='East_1'/><property name='toPort' value='West_1'/></pageflow-object>",
+    "<pageflow-object id='action-call:@page:index.jsp@#@action:passDataIn.do@'><property name='elbowsX' value='364,320,320,276'/><property name='elbowsY' value='172,172,172,172'/><property name='fromPort' value='West_1'/><property name='toPort' value='East_1'/></pageflow-object>",
+    "<pageflow-object id='action-call:@page:index.jsp@#@action:passString.do@'><property name='elbowsX' value='436,480,480,524'/><property name='elbowsY' value='172,172,172,172'/><property name='fromPort' value='East_1'/><property name='toPort' value='West_1'/></pageflow-object>",
+    "<pageflow-object id='action-call:@page:string_done.jsp@#@action:begin.do@'><property name='elbowsX' value='524,480,480,436'/><property name='elbowsY' value='672,672,52,52'/><property name='fromPort' value='West_1'/><property name='toPort' value='East_1'/></pageflow-object>",
+    "</view-properties>"
+})
+interface VIEW_PROPERTIES { }

Added: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/passToFromNested/dataIn_done.jsp
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/passToFromNested/dataIn_done.jsp	Tue Nov  9 16:03:33 2004
@@ -0,0 +1,14 @@
+<%@page contentType="text/html;charset=UTF-8" language="java"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%>
+<netui-data:declarePageInput name="message" type="java.lang.String"/>
+
+<html>
+    <head>
+    </head>
+    <body>
+        return: <b><netui:span value="${pageInput.message}"/></b>
+        <br/>
+        <netui:anchor action="begin">start over</netui:anchor>
+    </body>
+</html>
\ No newline at end of file

Added: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/passToFromNested/index.jsp
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/passToFromNested/index.jsp	Tue Nov  9 16:03:33 2004
@@ -0,0 +1,18 @@
+<%@ 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="passDataIn">pass DataIn</netui:anchor>
+        <br/>
+        <netui:anchor action="passString">pass String</netui:anchor>
+    </netui:body>
+</netui:html>
+
+  
\ No newline at end of file

Added: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/passToFromNested/nested/NestedController.jpf
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/passToFromNested/nested/NestedController.jpf	Tue Nov  9 16:03:33 2004
@@ -0,0 +1,109 @@
+package pageFlowCore.passToFromNested.nested;
+
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+
+@Jpf.Controller( nested=true )
+public class NestedController extends PageFlowController
+{
+    public interface DataIn
+    {
+        public String getMessage();
+    }
+
+    public interface DataOut
+    {
+        public String getMessage();
+    }
+
+    @Jpf.Action(
+        forwards={
+            @Jpf.Forward(
+                name="page",
+                path="dataIn.jsp",
+                actionOutputs = {
+                    @Jpf.ActionOutput(name = "message", type = String.class)
+                }
+            )
+        }
+    )
+    protected Forward begin( DataIn dataIn )
+    {
+        return new Forward( "page", "message", dataIn.getMessage() );
+    }
+
+    @Jpf.Action(
+        forwards={
+            @Jpf.Forward(
+                name="page",
+                path="string.jsp",
+                actionOutputs = {
+                    @Jpf.ActionOutput(name = "string", type = String.class)
+                }
+            )
+        }
+    )
+    protected Forward begin( String string )
+    {
+        return new Forward( "page", "string", string );
+    }
+
+    @Jpf.Action(
+        forwards={
+            @Jpf.Forward(
+                name="done",
+                returnAction="dataIn_done",
+                outputFormBeanType = DataOut.class
+            )
+        }
+    )
+    protected Forward doneDataIn()
+    {
+        DataOut out = new DataOut(){ public String getMessage(){ return "DataOut:bye"; } };
+    	return new Forward( "done", out );
+    }
+
+    @Jpf.Action(
+        forwards={
+            @Jpf.Forward(
+                name="done",
+                returnAction="string_done",
+                outputFormBeanType = String.class
+            )
+        }
+    )
+    protected Forward doneString()
+    {
+    	return new Forward( "done", "String:bye" );
+    }
+
+}
+
+@Jpf.ViewProperties(value = {
+    "<!-- This data is auto-generated. Hand-editing this section is not recommended. -->",
+    "<view-properties>",
+    "<pageflow-object id='pageflow:/pageFlowCore/passToFromNested/nested/NestedController.jpf'/>",
+    "<pageflow-object id='page:dataIn.jsp'><property name='x' value='120'/><property name='y' value='160'/></pageflow-object>",
+    "<pageflow-object id='page:string.jsp'><property name='x' value='220'/><property name='y' value='160'/></pageflow-object>",
+    "<pageflow-object id='action:begin.do#pageFlowCore.passToFromNested.nested.NestedController.DataIn'><property name='x' value='80'/><property name='y' value='60'/></pageflow-object>",
+    "<pageflow-object id='action:begin.do#java.lang.String'><property name='x' value='260'/><property name='y' value='60'/></pageflow-object>",
+    "<pageflow-object id='action:doneDataIn.do'><property name='x' value='100'/><property name='y' value='260'/></pageflow-object>",
+    "<pageflow-object id='action:doneString.do'><property name='x' value='240'/><property name='y' value='260'/></pageflow-object>",
+    "<pageflow-object id='formbean:pageFlowCore.passToFromNested.nested.NestedController.DataIn'/>",
+    "<pageflow-object id='formbean:java.lang.String'/>",
+    "<pageflow-object id='forward:path#page#dataIn.jsp#@action:begin.do#pageFlowCore.passToFromNested.nested.NestedController.DataIn@'><property name='elbowsX' value='80,80,120,120'/><property name='elbowsY' value='104,110,110,116'/><property name='fromPort' value='South_1'/><property name='toPort' value='North_1'/><property name='label' value='page'/></pageflow-object>",
+    "<pageflow-object id='forward:path#page#string.jsp#@action:begin.do#java.lang.String@'><property name='elbowsX' value='224,220,220,220'/><property name='elbowsY' value='52,52,84,116'/><property name='fromPort' value='West_1'/><property name='toPort' value='North_1'/><property name='label' value='page'/></pageflow-object>",
+    "<pageflow-object id='exit:dataIn_done'><property name='x' value='60'/><property name='y' value='360'/></pageflow-object>",
+    "<pageflow-object id='forward:returnAction#done#dataIn_done#@action:doneDataIn.do@'><property name='elbowsX' value='64,60,60,60'/><property name='elbowsY' value='252,252,284,316'/><property name='fromPort' value='West_1'/><property name='toPort' value='North_1'/><property name='label' value='done'/></pageflow-object>",
+    "<pageflow-object id='exit:string_done'><property name='x' value='260'/><property name='y' value='360'/></pageflow-object>",
+    "<pageflow-object id='forward:returnAction#done#string_done#@action:doneString.do@'><property name='elbowsX' value='240,240,260,260'/><property name='elbowsY' value='304,310,310,316'/><property name='fromPort' value='South_1'/><property name='toPort' value='North_1'/><property name='label' value='done'/></pageflow-object>",
+    "<pageflow-object id='action-output:message#@forward:path#page#dataIn.jsp#@action:begin.do#pageFlowCore.passToFromNested.nested.NestedController.DataIn@@'/>",
+    "<pageflow-object id='action-output:string#@forward:path#page#string.jsp#@action:begin.do#java.lang.String@@'/>",
+    "<pageflow-object id='exit:pageFlowCore_passToFromNested_nestedDone'><property value='460' name='x'/><property value='360' name='y'/></pageflow-object>",
+    "<pageflow-object id='action-call:@page:string.jsp@#@action:doneString.do@'><property name='elbowsX' value='220,220,229,229'/><property name='elbowsY' value='204,210,210,216'/><property name='fromPort' value='South_1'/><property name='toPort' value='North_0'/></pageflow-object>",
+    "<pageflow-object id='action-call:@page:dataIn.jsp@#@action:doneDataIn.do@'><property name='elbowsX' value='120,120,111,111'/><property name='elbowsY' value='204,210,210,216'/><property name='fromPort' value='South_1'/><property name='toPort' value='North_2'/></pageflow-object>",
+    "</view-properties>"
+})
+interface VIEW_PROPERTIES { }

Added: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/passToFromNested/nested/dataIn.jsp
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/passToFromNested/nested/dataIn.jsp	Tue Nov  9 16:03:33 2004
@@ -0,0 +1,16 @@
+<%@page contentType="text/html;charset=UTF-8" language="java"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%>
+<netui-data:declarePageInput name="message" type="java.lang.String"/>
+
+<html>
+    <head>
+    </head>
+    <body>
+        <h3>DataIn entry point</h3>
+
+        value: <b><netui:span value="${pageInput.message}"/></b>
+        <br/>
+        <netui:anchor action="doneDataIn">done</netui:anchor>
+    </body>
+</html>
\ No newline at end of file

Added: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/passToFromNested/nested/string.jsp
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/passToFromNested/nested/string.jsp	Tue Nov  9 16:03:33 2004
@@ -0,0 +1,16 @@
+<%@page contentType="text/html;charset=UTF-8" language="java"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%>
+<netui-data:declarePageInput name="string" type="java.lang.String"/>
+
+<html>
+    <head>
+    </head>
+    <body>
+        <h3>String entry point</h3>
+
+        value: <b><netui:span value="${pageInput.string}"/></b>
+        <br/>
+        <netui:anchor action="doneString">done</netui:anchor>
+    </body>
+</html>
\ No newline at end of file

Added: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/passToFromNested/string_done.jsp
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/passToFromNested/string_done.jsp	Tue Nov  9 16:03:33 2004
@@ -0,0 +1,15 @@
+<%@page contentType="text/html;charset=UTF-8" language="java"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%>
+<netui-data:declarePageInput name="string" type="java.lang.String"/>
+
+<html>
+    <head>
+    </head>
+    <body>
+        return: <b><netui:span value="${pageInput.string}"/></b>
+        <br/>
+        <netui:anchor action="begin">start over</netui:anchor>
+
+    </body>
+</html>
\ No newline at end of file

Modified: incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/JpfScopedFormsTest49.xml
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/JpfScopedFormsTest49.xml	(original)
+++ incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/JpfScopedFormsTest49.xml	Tue Nov  9 16:03:33 2004
@@ -101,12 +101,12 @@
          <br/>
          <form name="formA" action="/coreWeb/jpfScopedForms/test49/action1.do" method="post">
             <font color="blue">
-               String 1: <input type="text" name="{actionForm.string1}" value="String 1 value">
+               String 1: <input type="text" name="{actionForm.string1}" value="Jpf1 value 1">
             </font>
             <br/>
 
             <font color="blue">
-               String 2: <input type="text" name="{actionForm.string2}" value="String 2 value">
+               String 2: <input type="text" name="{actionForm.string2}" value="Jpf1 value 2">
             </font>
             <br/><br/>
             <font color="green">
@@ -624,4 +624,4 @@
   <testCount>5</testCount>
   <passedCount>2</passedCount>
   <failedCount>3</failedCount>
-</recorderSession>
\ No newline at end of file
+</recorderSession>

Modified: incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/OverloadedActions.xml
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/OverloadedActions.xml	(original)
+++ incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/OverloadedActions.xml	Tue Nov  9 16:03:33 2004
@@ -123,8 +123,6 @@
     
         <li><span>nestReturnNormalWithForm</span>
     
-        <li><span>overloaded_</span>
-    
         <li><span>nestReturnForm2</span>
     
         <li><span>conflictsWithNonAction</span>
@@ -269,8 +267,6 @@
     
         <li><span>nestReturnNormalWithForm</span>
     
-        <li><span>overloaded_</span>
-    
         <li><span>nestReturnForm2</span>
     
         <li><span>conflictsWithNonAction</span>
@@ -415,8 +411,6 @@
     
         <li><span>nestReturnNormalWithForm</span>
     
-        <li><span>overloaded_</span>
-    
         <li><span>nestReturnForm2</span>
     
         <li><span>conflictsWithNonAction</span>
@@ -561,8 +555,6 @@
     
         <li><span>nestReturnNormalWithForm</span>
     
-        <li><span>overloaded_</span>
-    
         <li><span>nestReturnForm2</span>
     
         <li><span>conflictsWithNonAction</span>
@@ -707,8 +699,6 @@
     
         <li><span>nestReturnNormalWithForm</span>
     
-        <li><span>overloaded_</span>
-    
         <li><span>nestReturnForm2</span>
     
         <li><span>conflictsWithNonAction</span>
@@ -853,8 +843,6 @@
     
         <li><span>nestReturnNormalWithForm</span>
     
-        <li><span>overloaded_</span>
-    
         <li><span>nestReturnForm2</span>
     
         <li><span>conflictsWithNonAction</span>
@@ -996,4 +984,4 @@
   <testCount>7</testCount>
   <passedCount>6</passedCount>
   <failedCount>1</failedCount>
-</recorderSession>
\ No newline at end of file
+</recorderSession>