cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject svn commit: r588111 - in /cocoon/branches/cocoon-forms-1.0.0/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms: acting/HandleFormSubmitAction.java generation/SuggestionListGenerator.java
Date Thu, 25 Oct 2007 01:54:11 GMT
Author: vgritsenko
Date: Wed Oct 24 18:54:10 2007
New Revision: 588111

URL: http://svn.apache.org/viewvc?rev=588111&view=rev
Log:
sync with trunk changes

Modified:
    cocoon/branches/cocoon-forms-1.0.0/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/acting/HandleFormSubmitAction.java
    cocoon/branches/cocoon-forms-1.0.0/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/generation/SuggestionListGenerator.java

Modified: cocoon/branches/cocoon-forms-1.0.0/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/acting/HandleFormSubmitAction.java
URL: http://svn.apache.org/viewvc/cocoon/branches/cocoon-forms-1.0.0/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/acting/HandleFormSubmitAction.java?rev=588111&r1=588110&r2=588111&view=diff
==============================================================================
--- cocoon/branches/cocoon-forms-1.0.0/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/acting/HandleFormSubmitAction.java
(original)
+++ cocoon/branches/cocoon-forms-1.0.0/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/acting/HandleFormSubmitAction.java
Wed Oct 24 18:54:10 2007
@@ -16,21 +16,23 @@
  */
 package org.apache.cocoon.forms.acting;
 
+import java.util.Collections;
+import java.util.Locale;
+import java.util.Map;
+
+import org.apache.avalon.framework.logger.Logger;
 import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.excalibur.source.Source;
+
+import org.apache.cocoon.components.LifecycleHelper;
+import org.apache.cocoon.environment.ObjectModelHelper;
 import org.apache.cocoon.environment.Redirector;
-import org.apache.cocoon.environment.SourceResolver;
 import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.ObjectModelHelper;
+import org.apache.cocoon.environment.SourceResolver;
 import org.apache.cocoon.forms.FormContext;
 import org.apache.cocoon.forms.event.FormHandler;
 import org.apache.cocoon.forms.formmodel.Form;
 import org.apache.cocoon.i18n.I18nUtils;
-import org.apache.cocoon.components.LifecycleHelper;
-import org.apache.excalibur.source.Source;
-
-import java.util.Map;
-import java.util.Collections;
-import java.util.Locale;
 
 /**
  * An action that will create a form instance, let it handle the current request (and
@@ -61,13 +63,13 @@
             Form form = formManager.createForm(source);
 
             Request request = ObjectModelHelper.getRequest(objectModel);
-            FormHandler formHandler = null;
+            FormHandler formHandler;
 
             if (formHandlerClassName != null) {
                 // TODO cache these classes
                 Class clazz = Thread.currentThread().getContextClassLoader().loadClass(formHandlerClassName);
                 formHandler = (FormHandler)clazz.newInstance();
-                LifecycleHelper.setupComponent(formHandler, null, null, manager, null);
+                LifecycleHelper.setupComponent(formHandler, (Logger) null, null, manager,
null);
                 form.setFormHandler(formHandler);
             }
 

Modified: cocoon/branches/cocoon-forms-1.0.0/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/generation/SuggestionListGenerator.java
URL: http://svn.apache.org/viewvc/cocoon/branches/cocoon-forms-1.0.0/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/generation/SuggestionListGenerator.java?rev=588111&r1=588110&r2=588111&view=diff
==============================================================================
--- cocoon/branches/cocoon-forms-1.0.0/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/generation/SuggestionListGenerator.java
(original)
+++ cocoon/branches/cocoon-forms-1.0.0/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/generation/SuggestionListGenerator.java
Wed Oct 24 18:54:10 2007
@@ -26,6 +26,7 @@
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
+
 import org.apache.cocoon.ProcessingException;
 import org.apache.cocoon.components.flow.ContinuationsManager;
 import org.apache.cocoon.components.flow.InvalidContinuationException;
@@ -42,6 +43,7 @@
 import org.apache.cocoon.forms.formmodel.Form;
 import org.apache.cocoon.generation.ServiceableGenerator;
 import org.apache.cocoon.sitemap.SitemapParameters;
+
 import org.mozilla.javascript.Scriptable;
 import org.mozilla.javascript.continuations.Continuation;
 import org.xml.sax.ContentHandler;
@@ -53,7 +55,8 @@
  * @since 2.1.8
  * @version $Id$
  */
-public class SuggestionListGenerator extends ServiceableGenerator implements Contextualizable
{
+public class SuggestionListGenerator extends ServiceableGenerator
+                                     implements Contextualizable {
 
     private ContinuationsManager contManager;
     private WebContinuation wk;
@@ -62,6 +65,7 @@
     private Locale locale;
     private Context context;
 
+
     public void contextualize(Context ctx) throws ContextException {
         this.context = ctx;
     }
@@ -71,7 +75,8 @@
         this.contManager = (ContinuationsManager)manager.lookup(ContinuationsManager.ROLE);
     }
 
-    public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par)
throws ProcessingException, SAXException, IOException {
+    public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par)
+    throws ProcessingException, SAXException, IOException {
         super.setup(resolver, objectModel, src, par);
         
         Request req = ObjectModelHelper.getRequest(objectModel);
@@ -116,13 +121,13 @@
         FOM_Cocoon cocoon = null;
         if (wk.getContinuation() instanceof Continuation) {
             oldScope = FOM_JavaScriptFlowHelper.getFOM_FlowScope(objectModel);
-            
-            Continuation k = (Continuation)wk.getContinuation();
+
+            Continuation k = (Continuation) wk.getContinuation();
             Scriptable kScope = k.getParentScope();
             // Register the current scope for scripts indirectly called from this function
             FOM_JavaScriptFlowHelper.setFOM_FlowScope(objectModel, kScope);
-            cocoon = (FOM_Cocoon)kScope.get("cocoon", kScope);
-            cocoon.pushCallContext(null, null, this.manager, this.context, getLogger(), wk);
+            cocoon = (FOM_Cocoon) kScope.get("cocoon", kScope);
+            cocoon.pushCallContext(null, null, this.context, wk);
         }
 
         try {
@@ -142,5 +147,4 @@
         super.contentHandler.endPrefixMapping(FormsConstants.INSTANCE_PREFIX);
         super.contentHandler.endDocument();
     }
-
 }



Mime
View raw message