continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r170245 - in /maven/continuum/trunk/continuum-web/src/main/java/org/codehaus/continuum/web: context/ViewContextPopulator.java pipeline/valve/ContinuumViewContextPopulatorValve.java
Date Sun, 15 May 2005 18:33:42 GMT
Author: jvanzyl
Date: Sun May 15 11:33:42 2005
New Revision: 170245

URL: http://svn.apache.org/viewcvs?rev=170245&view=rev
Log:
o updating to use summit request parameters

Modified:
    maven/continuum/trunk/continuum-web/src/main/java/org/codehaus/continuum/web/context/ViewContextPopulator.java
    maven/continuum/trunk/continuum-web/src/main/java/org/codehaus/continuum/web/pipeline/valve/ContinuumViewContextPopulatorValve.java

Modified: maven/continuum/trunk/continuum-web/src/main/java/org/codehaus/continuum/web/context/ViewContextPopulator.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/java/org/codehaus/continuum/web/context/ViewContextPopulator.java?rev=170245&r1=170244&r2=170245&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/java/org/codehaus/continuum/web/context/ViewContextPopulator.java
(original)
+++ maven/continuum/trunk/continuum-web/src/main/java/org/codehaus/continuum/web/context/ViewContextPopulator.java
Sun May 15 11:33:42 2005
@@ -16,6 +16,8 @@
  * limitations under the License.
  */
 
+import org.codehaus.plexus.summit.parameters.RequestParameters;
+
 import java.util.Map;
 
 /**
@@ -26,6 +28,5 @@
 {
     String ROLE = ViewContextPopulator.class.getName();
 
-    /** Map of scalars to place in the context. */
     Map getScalars( String view, Object model, Map parameters );
 }

Modified: maven/continuum/trunk/continuum-web/src/main/java/org/codehaus/continuum/web/pipeline/valve/ContinuumViewContextPopulatorValve.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/java/org/codehaus/continuum/web/pipeline/valve/ContinuumViewContextPopulatorValve.java?rev=170245&r1=170244&r2=170245&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/java/org/codehaus/continuum/web/pipeline/valve/ContinuumViewContextPopulatorValve.java
(original)
+++ maven/continuum/trunk/continuum-web/src/main/java/org/codehaus/continuum/web/pipeline/valve/ContinuumViewContextPopulatorValve.java
Sun May 15 11:33:42 2005
@@ -21,10 +21,12 @@
 import org.codehaus.plexus.summit.pipeline.valve.CreateViewContextValve;
 import org.codehaus.plexus.summit.rundata.RunData;
 import org.codehaus.plexus.summit.view.ViewContext;
+import org.codehaus.continuum.web.pipeline.valve.RequestParameterMap;
 
 import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Iterator;
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
@@ -53,16 +55,17 @@
                     // ----------------------------------------------------------------------
                     // We take the parameters from the request so that they can be used to
                     // parameterize the expressions used to extract values out of the
-                    // application model.
+                    // application model. We use the request parameters as the have been
+                    // parsed from the ReqestParameters class.
                     // ----------------------------------------------------------------------
 
                     Map parameters = new HashMap();
 
-                    for ( Enumeration e = data.getRequest().getParameterNames(); e.hasMoreElements();
)
+                    for ( Iterator i  = data.getParameters().getParametersMap().keySet().iterator();
i.hasNext(); )
                     {
-                        String key = (String) e.nextElement();
+                        String key = (String) i.next();
 
-                        parameters.put( key, data.getRequest().getParameter( key ) );
+                        parameters.put( key, data.getParameters().getString( key ) );
                     }
 
                     // ----------------------------------------------------------------------



Mime
View raw message