Author: rich
Date: Fri Feb 18 10:15:36 2005
New Revision: 154332

URL: http://svn.apache.org/viewcvs?view=rev&rev=154332
Log:
Fix for http://issues.apache.org/jira/browse/BEEHIVE-301 : Add 
addActionErrorExpression method to PageFlowUtils class like FlowController has

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


Modified:
    
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowUtils.java

Modified: 
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowUtils.java
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowUtils.java?view=diff&r1=154331&r2=154332
==============================================================================
--- 
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowUtils.java
 (original)
+++ 
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowUtils.java
 Fri Feb 18 10:15:36 2005
@@ -31,7 +31,6 @@
 import org.apache.beehive.netui.pageflow.scoping.ScopedRequest;
 import org.apache.beehive.netui.pageflow.scoping.ScopedResponse;
 import org.apache.beehive.netui.pageflow.scoping.ScopedServletUtils;
-import org.apache.beehive.netui.pageflow.scoping.internal.ScopedRequestImpl;
 import org.apache.beehive.netui.util.FileUtils;
 import org.apache.beehive.netui.util.ServletUtils;
 import org.apache.beehive.netui.util.logging.Logger;
@@ -50,7 +49,6 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
-import javax.servlet.http.HttpServletRequestWrapper;
 import java.io.PrintStream;
 import java.net.URISyntaxException;
 import java.util.Collections;
@@ -273,12 +271,27 @@
         return sf instanceof GlobalApp ? ( GlobalApp ) sf : null;
     }
 
+    /**
+     * Get the a map of shared flow name to shared flow instance, based on the 
names defined in the
+     * [EMAIL PROTECTED] 
org.apache.beehive.netui.pageflow.annotations.Jpf.Controller#sharedFlowRefs} 
annotation of the
+     * <strong>current page flow</strong>.
+     * 
+     * @param request the current HttpServletRequest, which is used to 
determine the current page flow.
+     * @return a Map of shared flow name (string) to shared flow instance 
([EMAIL PROTECTED] SharedFlowController}).
+     */ 
     public static Map< String, SharedFlowController > getSharedFlows( 
HttpServletRequest request )
     {
         Map< String, SharedFlowController > sharedFlows = 
ImplicitObjectUtil.getSharedFlow( request );
         return sharedFlows != null ? sharedFlows : Collections.EMPTY_MAP;
     }
     
+    /**
+     * Get the shared flow with the given class name.
+     * 
+     * @param sharedFlowClassName the class name of the shared flow to remove.
+     * @param request the current HttpServletRequest.
+     * @return the [EMAIL PROTECTED] SharedFlowController} of the given class 
name which is stored in the user session.
+     */ 
     public static SharedFlowController getSharedFlow( String 
sharedFlowClassName, HttpServletRequest request )
     {
         HttpSession session = request.getSession( false );
@@ -793,7 +806,7 @@
     
     /**
      * Add a validation error that will be shown with the Errors and Error 
tags.
-     * @deprecated Use [EMAIL PROTECTED] #addActionMessage(ServletRequest, 
String, String, Object[])} instead.
+     * @deprecated Use [EMAIL PROTECTED] #addActionError(ServletRequest, 
String, String, Object[])} instead.
      * 
      * @param propertyName the name of the property with which to associate 
this error.
      * @param messageKey the message-resources key for the error message.
@@ -809,7 +822,7 @@
     
     /**
      * Add a validation error that will be shown with the Errors and Error 
tags.
-     * @deprecated Use [EMAIL PROTECTED] #addActionMessage(ServletRequest, 
String, String, Object[])} instead.
+     * @deprecated Use [EMAIL PROTECTED] #addActionError(ServletRequest, 
String, String, Object[])} instead.
      * 
      * @param propertyName the name of the property with which to associate 
this error.
      * @param messageKey the message-resources key for the error message.
@@ -819,12 +832,12 @@
     public static void addValidationError( String propertyName, String 
messageKey, Object messageArg,
                                            ServletRequest request )
     {
-        addActionMessage( request, propertyName, messageKey, messageArg );
+        addActionError( request, propertyName, messageKey, messageArg );
     }
     
     /**
      * Add a validation error that will be shown with the Errors and Error 
tags.
-     * @deprecated Use [EMAIL PROTECTED] #addActionMessage(ServletRequest, 
String, String, Object[])} instead.
+     * @deprecated Use [EMAIL PROTECTED] #addActionError(ServletRequest, 
String, String, Object[])} instead.
      * 
      * @param propertyName the name of the property with which to associate 
this error.
      * @param messageKey the message-resources key for the error message.
@@ -832,7 +845,7 @@
      */ 
     public static void addValidationError( String propertyName, String 
messageKey, ServletRequest request )
     {
-        addActionMessage( request, propertyName, messageKey );
+        addActionError( request, propertyName, messageKey );
     }
     
     /**
@@ -843,8 +856,8 @@
      * @param messageKey the message-resources key for the message.
      * @param messageArgs zero or more arguments to the message.
      */ 
-    public static void addActionMessage( ServletRequest request, String 
propertyName, String messageKey,
-                                         Object ... messageArgs )
+    public static void addActionError( ServletRequest request, String 
propertyName, String messageKey,
+                                       Object ... messageArgs )
     {
         InternalUtils.addActionError( propertyName, new ActionMessage( 
messageKey, messageArgs ), request );
     }
@@ -857,8 +870,8 @@
      * @param expression the expression that will be evaluated to generate the 
error message.
      * @param messageArgs zero or more arguments to the message.
      */ 
-    public static void addActionMessageExpression( ServletRequest request, 
String propertyName, String expression,
-                                                   Object ... messageArgs )
+    public static void addActionErrorExpression( ServletRequest request, 
String propertyName, String expression,
+                                                 Object ... messageArgs )
     {
         InternalUtils.addActionError( propertyName, new ExpressionMessage( 
expression, messageArgs ), request );
     }


Reply via email to