cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giac...@apache.org
Subject svn commit: r590638 - in /cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/datatype: FlowJXPathSelectionList.java FlowJXPathSelectionListBuilder.java
Date Wed, 31 Oct 2007 12:10:54 GMT
Author: giacomo
Date: Wed Oct 31 05:10:53 2007
New Revision: 590638

URL: http://svn.apache.org/viewvc?rev=590638&view=rev
Log:
fixing issues with stale objectModel in jx-path selction-lists

Modified:
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/datatype/FlowJXPathSelectionList.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/datatype/FlowJXPathSelectionListBuilder.java

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/datatype/FlowJXPathSelectionList.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/datatype/FlowJXPathSelectionList.java?rev=590638&r1=590637&r2=590638&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/datatype/FlowJXPathSelectionList.java
(original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/datatype/FlowJXPathSelectionList.java
Wed Oct 31 05:10:53 2007
@@ -24,6 +24,7 @@
 import org.apache.cocoon.forms.FormsConstants;
 import org.apache.cocoon.forms.util.I18nMessage;
 import org.apache.cocoon.el.objectmodel.ObjectModel;
+import org.apache.cocoon.processing.ProcessInfoProvider;
 import org.apache.cocoon.xml.AttributesImpl;
 import org.apache.cocoon.xml.XMLUtils;
 import org.apache.commons.jxpath.JXPathContext;
@@ -41,7 +42,7 @@
  */
 public class FlowJXPathSelectionList implements SelectionList {
 
-    private Map objectModel;
+    private ProcessInfoProvider processInfoProvider;
     private String listPath;
     private String valuePath;
     private String labelPath;
@@ -53,7 +54,7 @@
     private String i18nCatalog;
     private boolean labelIsI18nKey = false;
 
-    public FlowJXPathSelectionList(Map objectModel, 
+    public FlowJXPathSelectionList(ProcessInfoProvider processInfoProvider, 
                                    String listPath, 
                                    String valuePath, 
                                    String labelPath, 
@@ -62,7 +63,7 @@
                                    boolean nullTextIsI18nKey, 
                                    String i18nCatalog, 
                                    boolean labelIsI18nKey) {
-        this.objectModel = objectModel;
+        this.processInfoProvider = processInfoProvider;
         this.listPath = listPath;
         this.valuePath = valuePath;
         this.labelPath = labelPath;
@@ -99,7 +100,7 @@
         JXPathContext ctx = null;
         Iterator iter = null;
         if (model == null) {
-            Object flowData = FlowHelper.getContextObject(objectModel);
+            Object flowData = FlowHelper.getContextObject(processInfoProvider.getObjectModel());
             if (flowData == null) {
                 throw new SAXException("No flow data to produce selection list");
             }

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/datatype/FlowJXPathSelectionListBuilder.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/datatype/FlowJXPathSelectionListBuilder.java?rev=590638&r1=590637&r2=590638&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/datatype/FlowJXPathSelectionListBuilder.java
(original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/datatype/FlowJXPathSelectionListBuilder.java
Wed Oct 31 05:10:53 2007
@@ -82,7 +82,7 @@
 
         String i18nCatalog = DomHelper.getAttribute(selectionListElement, "catalogue", null);
 
-        return new FlowJXPathSelectionList(processInfoProvider.getObjectModel(),
+        return new FlowJXPathSelectionList(processInfoProvider,
                                            listPath,
                                            valuePath,
                                            labelPath,



Mime
View raw message