svn commit: r960512 [6/7] - in /ofbiz/branches/jquery: ./ applications/accounting/config/ applications/accounting/data/ applications/accounting/entitydef/ applications/accounting/script/org/ofbiz/accounting/invoice/ applications/accounting/servicedef/ ...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r960512 [6/7] - in /ofbiz/branches/jquery: ./ applications/accounting/config/ applications/accounting/data/ applications/accounting/entitydef/ applications/accounting/script/org/ofbiz/accounting/invoice/ applications/accounting/servicedef/ ...

jleroux@apache.org
Modified: ofbiz/branches/jquery/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java?rev=960512&r1=960511&r2=960512&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java (original)
+++ ofbiz/branches/jquery/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java Mon Jul  5 10:07:56 2010
@@ -62,7 +62,6 @@ import org.ofbiz.security.authz.Authoriz
 import org.ofbiz.security.authz.AuthorizationFactory;
 import org.ofbiz.service.GenericDispatcher;
 import org.ofbiz.service.LocalDispatcher;
-import org.ofbiz.webapp.website.WebSiteWorker;
 
 /**
  * ContextFilter - Restricts access to raw files and configures servlet objects.
@@ -134,12 +133,14 @@ public class ContextFilter implements Fi
             Thread.currentThread().setContextClassLoader(localCachedClassLoader);
         }
 
-        // set the webSiteId in the session
-        httpRequest.getSession().setAttribute("webSiteId", WebSiteWorker.getWebSiteId(httpRequest));
-
         // set the ServletContext in the request for future use
         request.setAttribute("servletContext", config.getServletContext());
 
+        // set the webSiteId in the session
+        if (UtilValidate.isEmpty(httpRequest.getSession().getAttribute("webSiteId"))){
+            httpRequest.getSession().setAttribute("webSiteId", config.getServletContext().getAttribute("webSiteId"));
+        }
+
         // set the filesystem path of context root.
         request.setAttribute("_CONTEXT_ROOT_", config.getServletContext().getRealPath("/"));
 
@@ -245,10 +246,12 @@ public class ContextFilter implements Fi
 
                 if (redirectPath == null) {
                     int error = 404;
-                    try {
-                        error = Integer.parseInt(errorCode);
-                    } catch (NumberFormatException nfe) {
-                        Debug.logWarning(nfe, "Error code specified would not parse to Integer : " + errorCode, module);
+                    if (UtilValidate.isNotEmpty(errorCode)) {
+                        try {
+                            error = Integer.parseInt(errorCode);
+                        } catch (NumberFormatException nfe) {
+                            Debug.logWarning(nfe, "Error code specified would not parse to Integer : " + errorCode, module);
+                        }
                     }
                     filterMessage = filterMessage + " (" + error + ")";
                     wrapper.sendError(error, contextUri);

Modified: ofbiz/branches/jquery/framework/webapp/testdef/webapptests.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/webapp/testdef/webapptests.xml?rev=960512&r1=960511&r2=960512&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/webapp/testdef/webapptests.xml (original)
+++ ofbiz/branches/jquery/framework/webapp/testdef/webapptests.xml Mon Jul  5 10:07:56 2010
@@ -17,11 +17,8 @@
   under the License.
   -->
 
-<test-suite suite-name="webapptests"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/test-suite.xsd">
-
-    <test-case case-name="webapp-tests">
-        <junit-test-suite class-name="org.ofbiz.webapp.test.XmlRpcTests"/>
-    </test-case>
-</test-suite>
+<!--<test-suite suite-name="webapptests"-->
+<!--        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"-->
+<!--        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/test-suite.xsd">-->
+<!---->
+<!--</test-suite>-->

Modified: ofbiz/branches/jquery/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java?rev=960512&r1=960511&r2=960512&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java (original)
+++ ofbiz/branches/jquery/framework/webtools/src/org/ofbiz/webtools/WebToolsServices.java Mon Jul  5 10:07:56 2010
@@ -745,8 +745,8 @@ public class WebToolsServices {
                             List<String> fieldNameList = FastList.newInstance();
 
                             ModelIndex index = entity.getIndex(r);
-                            for (Iterator<String> fieldIterator = index.getIndexFieldsIterator(); fieldIterator.hasNext();) {
-                                fieldNameList.add(fieldIterator.next());
+                            for (Iterator<ModelIndex.Field> fieldIterator = index.getFieldsIterator(); fieldIterator.hasNext();) {
+                                fieldNameList.add(fieldIterator.next().getFieldName());
                             }
 
                             Map<String, Object> indexMap = FastMap.newInstance();

Modified: ofbiz/branches/jquery/framework/webtools/webapp/webtools/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/webtools/webapp/webtools/WEB-INF/web.xml?rev=960512&r1=960511&r2=960512&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/webtools/webapp/webtools/WEB-INF/web.xml (original)
+++ ofbiz/branches/jquery/framework/webtools/webapp/webtools/WEB-INF/web.xml Mon Jul  5 10:07:56 2010
@@ -75,7 +75,7 @@ under the License.
         </init-param>
         <init-param>
             <param-name>allowedPaths</param-name>
-            <param-value>/control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/applet:/includes/maincss.css</param-value>
+            <param-value>/error:/control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/applet:/includes/maincss.css</param-value>
         </init-param>
         <init-param>
             <param-name>errorCode</param-name>

Modified: ofbiz/branches/jquery/framework/webtools/webapp/webtools/entity/ListGeneric.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/webtools/webapp/webtools/entity/ListGeneric.ftl?rev=960512&r1=960511&r2=960512&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/webtools/webapp/webtools/entity/ListGeneric.ftl (original)
+++ ofbiz/branches/jquery/framework/webtools/webapp/webtools/entity/ListGeneric.ftl Mon Jul  5 10:07:56 2010
@@ -46,7 +46,7 @@ under the License.
             <#else>
                 <tr>
                     <td colspan="${columnCount}">
-                        <h2>${uiLabelMap.WebtoolsNoEntityRecordFound} ${entityName}.</h2>
+                        <h2>${uiLabelMap.WebtoolsNoEntityRecordsFound} ${entityName}.</h2>
                     </td>
                 </tr>
             </#if>

Modified: ofbiz/branches/jquery/framework/widget/dtd/widget-form.xsd
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/dtd/widget-form.xsd?rev=960512&r1=960511&r2=960512&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/widget/dtd/widget-form.xsd (original)
+++ ofbiz/branches/jquery/framework/widget/dtd/widget-form.xsd Mon Jul  5 10:07:56 2010
@@ -371,6 +371,9 @@ under the License.
             <xs:documentation>Area to be updated when a form event occurs.</xs:documentation>
         </xs:annotation>
         <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" maxOccurs="unbounded" ref="parameter"/>
+            </xs:sequence>
             <xs:attributeGroup ref="attlist.on-form-event-update-area"/>
         </xs:complexType>
     </xs:element>
@@ -1286,6 +1289,7 @@ under the License.
                     <xs:enumeration value="equals"/>
                     <xs:enumeration value="not-equals"/>
                     <xs:enumeration value="in"/>
+                    <xs:enumeration value="not-in"/>
                     <xs:enumeration value="between"/>
                     <xs:enumeration value="like"/>
                 </xs:restriction>

Modified: ofbiz/branches/jquery/framework/widget/dtd/widget-screen.xsd
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/dtd/widget-screen.xsd?rev=960512&r1=960511&r2=960512&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/widget/dtd/widget-screen.xsd (original)
+++ ofbiz/branches/jquery/framework/widget/dtd/widget-screen.xsd Mon Jul  5 10:07:56 2010
@@ -652,6 +652,7 @@ under the License.
                     <xs:enumeration value="equals"/>
                     <xs:enumeration value="not-equals"/>
                     <xs:enumeration value="in"/>
+                    <xs:enumeration value="not-in"/>
                     <xs:enumeration value="between"/>
                     <xs:enumeration value="like"/>
                 </xs:restriction>

Modified: ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java?rev=960512&r1=960511&r2=960512&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java (original)
+++ ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java Mon Jul  5 10:07:56 2010
@@ -46,6 +46,7 @@ import org.ofbiz.base.util.UtilHttp;
 import org.ofbiz.base.util.UtilMisc;
 import org.ofbiz.base.util.UtilProperties;
 import org.ofbiz.base.util.UtilValidate;
+import org.ofbiz.base.util.collections.MapStack;
 import org.ofbiz.base.util.string.FlexibleStringExpander;
 import org.ofbiz.base.util.template.FreeMarkerWorker;
 import org.ofbiz.entity.Delegator;
@@ -2794,6 +2795,7 @@ public class MacroFormRenderer implement
             } else {
                 ajaxUrl += ",";
             }
+            Map<String, String> parameters = updateArea.getParameterMap((Map<String, Object>) context);
             String targetUrl = updateArea.getAreaTarget(context);
             String ajaxParams = getAjaxParamsFromTarget(targetUrl);
             if (UtilValidate.isNotEmpty(extraParams)) {
@@ -2802,11 +2804,23 @@ public class MacroFormRenderer implement
                 }
                 ajaxParams += extraParams;
             }
+            if(UtilValidate.isNotEmpty(parameters)){
+                if(UtilValidate.isEmpty(ajaxParams)){
+                    ajaxParams = "";
+                }
+                for (String key : parameters.keySet()) {
+                    if (ajaxParams.length()>0){
+                        ajaxParams += "&";
+                    }
+                    ajaxParams += key + "=" + parameters.get(key);
+                }
+            }
             ajaxUrl += updateArea.getAreaId() + ",";
             ajaxUrl += this.rh.makeLink(this.request, this.response, UtilHttp.removeQueryStringFromTarget(targetUrl));
             ajaxUrl += "," + ajaxParams;
         }
-        return ajaxUrl;
+        Locale locale = UtilMisc.ensureLocale(context.get("locale"));
+        return FlexibleStringExpander.expandString(ajaxUrl, context, locale);
     }
     /** Extracts parameters from a target URL string, prepares them for an Ajax
      * JavaScript call. This method is currently set to return a parameter string

Modified: ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/ModelForm.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/ModelForm.java?rev=960512&r1=960511&r2=960512&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/ModelForm.java (original)
+++ ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/ModelForm.java Mon Jul  5 10:07:56 2010
@@ -1986,12 +1986,16 @@ public class ModelForm extends ModelWidg
     }
 
     public String getCurrentContainerId(Map<String, Object> context) {
+        Locale locale = UtilMisc.ensureLocale(context.get("locale"));
+
+        String retVal = FlexibleStringExpander.expandString(this.getContainerId(), context, locale);
+
         Integer itemIndex = (Integer) context.get("itemIndex");
         if (itemIndex != null && "list".equals(this.getType())) {
-            return this.getContainerId() + this.getItemIndexSeparator() + itemIndex.intValue();
+            return retVal + this.getItemIndexSeparator() + itemIndex.intValue();
         }
 
-        return this.getContainerId();
+        return retVal;
     }
 
     public String getContainerStyle() {
@@ -2722,6 +2726,7 @@ public class ModelForm extends ModelWidg
         protected String eventType;
         protected String areaId;
         protected String areaTarget;
+        List<WidgetWorker.Parameter> parameterList =FastList.newInstance();
         /** XML constructor.
          * @param updateAreaElement The <code>&lt;on-xxx-update-area&gt;</code>
          * XML element.
@@ -2730,6 +2735,10 @@ public class ModelForm extends ModelWidg
             this.eventType = updateAreaElement.getAttribute("event-type");
             this.areaId = updateAreaElement.getAttribute("area-id");
             this.areaTarget = updateAreaElement.getAttribute("area-target");
+            List<? extends Element> parameterElementList = UtilXml.childElementList(updateAreaElement, "parameter");
+            for (Element parameterElement: parameterElementList) {
+                this.parameterList.add(new WidgetWorker.Parameter(parameterElement));
+            }
         }
         /** String constructor.
          * @param areaId The id of the widget element to be updated
@@ -2757,6 +2766,14 @@ public class ModelForm extends ModelWidg
         public String getAreaTarget(Map<String, ? extends Object> context) {
             return FlexibleStringExpander.expandString(areaTarget, context);
         }
+        public Map<String, String> getParameterMap(Map<String, Object> context) {
+            Map<String, String> fullParameterMap = FastMap.newInstance();
+            for (WidgetWorker.Parameter parameter: this.parameterList) {
+                fullParameterMap.put(parameter.getName(), parameter.getValue(context));
+            }
+            
+            return fullParameterMap;
+        }
     }
 
     public static class AutoFieldsService {

Modified: ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/menu/ModelMenuAction.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/menu/ModelMenuAction.java?rev=960512&r1=960511&r2=960512&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/menu/ModelMenuAction.java (original)
+++ ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/menu/ModelMenuAction.java Mon Jul  5 10:07:56 2010
@@ -44,6 +44,7 @@ import org.ofbiz.base.util.UtilPropertie
 import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.base.util.UtilXml;
 import org.ofbiz.base.util.collections.FlexibleMapAccessor;
+import org.ofbiz.base.util.collections.ResourceBundleMapWrapper;
 import org.ofbiz.base.util.string.FlexibleStringExpander;
 import org.ofbiz.entity.finder.ByAndFinder;
 import org.ofbiz.entity.finder.ByConditionFinder;
@@ -241,7 +242,7 @@ public abstract class ModelMenuAction {
 
     public static class PropertyMap extends ModelMenuAction {
         protected FlexibleStringExpander resourceExdr;
-        protected FlexibleMapAccessor<Map<String, Object>> mapNameAcsr;
+        protected FlexibleMapAccessor<ResourceBundleMapWrapper> mapNameAcsr;
         protected FlexibleStringExpander globalExdr;
 
         public PropertyMap(ModelMenu modelMenu, Element setElement) {
@@ -259,13 +260,36 @@ public abstract class ModelMenuAction {
 
             Locale locale = (Locale) context.get("locale");
             String resource = this.resourceExdr.expandString(context, locale);
-            Map<String, Object> propertyMap = UtilProperties.getResourceBundleMap(resource, locale);
-            this.mapNameAcsr.put(context, propertyMap);
+
+            ResourceBundleMapWrapper existingPropMap = this.mapNameAcsr.get(context);
+            if (existingPropMap == null) {
+                this.mapNameAcsr.put(context, UtilProperties.getResourceBundleMap(resource, locale, context));
+            } else {
+                try {
+                    existingPropMap.addBottomResourceBundle(resource);
+                } catch (IllegalArgumentException e) {
+                    // log the error, but don't let it kill everything just for a typo or bad char in an l10n file
+                    Debug.logError(e, "Error adding resource bundle [" + resource + "]: " + e.toString(), module);
+                }
+            }
 
             if (global) {
                 Map<String, Object> globalCtx = UtilGenerics.checkMap(context.get("globalContext"));
                 if (globalCtx != null) {
-                    this.mapNameAcsr.put(globalCtx, propertyMap);
+                    ResourceBundleMapWrapper globalExistingPropMap = this.mapNameAcsr.get(globalCtx);
+                    if (globalExistingPropMap == null) {
+                        this.mapNameAcsr.put(globalCtx, UtilProperties.getResourceBundleMap(resource, locale, context));
+                    } else {
+                        // is it the same object? if not add it in here too...
+                        if (existingPropMap != globalExistingPropMap) {
+                            try {
+                                globalExistingPropMap.addBottomResourceBundle(resource);
+                            } catch (IllegalArgumentException e) {
+                                // log the error, but don't let it kill everything just for a typo or bad char in an l10n file
+                                Debug.logError(e, "Error adding resource bundle [" + resource + "]: " + e.toString(), module);
+                            }
+                        }
+                    }
                 }
             }
         }

Modified: ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/screen/ModelScreen.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/screen/ModelScreen.java?rev=960512&r1=960511&r2=960512&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/screen/ModelScreen.java (original)
+++ ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/screen/ModelScreen.java Mon Jul  5 10:07:56 2010
@@ -18,7 +18,6 @@
  *******************************************************************************/
 package org.ofbiz.widget.screen;
 
-import java.io.Serializable;
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
@@ -39,13 +38,14 @@ import org.ofbiz.entity.transaction.Tran
 import org.ofbiz.service.LocalDispatcher;
 import org.ofbiz.webapp.control.ConfigXMLReader;
 import org.ofbiz.widget.ModelWidget;
+import org.ofbiz.widget.ModelWidgetAction;
 import org.w3c.dom.Element;
 
 /**
  * Widget Library - Screen model class
  */
 @SuppressWarnings("serial")
-public class ModelScreen extends ModelWidget implements Serializable {
+public class ModelScreen extends ModelWidget {
 
     public static final String module = ModelScreen.class.getName();
 
@@ -89,13 +89,13 @@ public class ModelScreen extends ModelWi
 
     protected static void findServiceNamesUsedInWidget(ModelScreenWidget currentWidget, Set<String> allServiceNamesUsed) {
         if (currentWidget instanceof ModelScreenWidget.Section) {
-            List<ModelScreenAction> actions = ((ModelScreenWidget.Section)currentWidget).actions;
+            List<ModelWidgetAction> actions = ((ModelScreenWidget.Section)currentWidget).actions;
             List<ModelScreenWidget> subWidgets = ((ModelScreenWidget.Section)currentWidget).subWidgets;
             List<ModelScreenWidget> failWidgets = ((ModelScreenWidget.Section)currentWidget).failWidgets;
             if (actions != null) {
-                for (ModelScreenAction screenOperation: actions) {
-                    if (screenOperation instanceof ModelScreenAction.Service) {
-                        String serviceName = ((ModelScreenAction.Service) screenOperation).serviceNameExdr.getOriginal();
+                for (ModelWidgetAction screenOperation: actions) {
+                    if (screenOperation instanceof ModelWidgetAction.Service) {
+                        String serviceName = ((ModelWidgetAction.Service) screenOperation).getServiceNameExdr().getOriginal();
                         if (UtilValidate.isNotEmpty(serviceName)) allServiceNamesUsed.add(serviceName);
                     }
                 }
@@ -148,25 +148,25 @@ public class ModelScreen extends ModelWi
     }
     protected static void findEntityNamesUsedInWidget(ModelScreenWidget currentWidget, Set<String> allEntityNamesUsed) {
         if (currentWidget instanceof ModelScreenWidget.Section) {
-            List<ModelScreenAction> actions = ((ModelScreenWidget.Section)currentWidget).actions;
+            List<ModelWidgetAction> actions = ((ModelScreenWidget.Section)currentWidget).actions;
             List<ModelScreenWidget> subWidgets = ((ModelScreenWidget.Section)currentWidget).subWidgets;
             List<ModelScreenWidget> failWidgets = ((ModelScreenWidget.Section)currentWidget).failWidgets;
             if (actions != null) {
-                for (ModelScreenAction screenOperation: actions) {
-                    if (screenOperation instanceof ModelScreenAction.EntityOne) {
-                        String entName = ((ModelScreenAction.EntityOne) screenOperation).finder.getEntityName();
+                for (ModelWidgetAction screenOperation: actions) {
+                    if (screenOperation instanceof ModelWidgetAction.EntityOne) {
+                        String entName = ((ModelWidgetAction.EntityOne) screenOperation).getFinder().getEntityName();
                         if (UtilValidate.isNotEmpty(entName)) allEntityNamesUsed.add(entName);
-                    } else if (screenOperation instanceof ModelScreenAction.EntityAnd) {
-                        String entName = ((ModelScreenAction.EntityAnd) screenOperation).finder.getEntityName();
+                    } else if (screenOperation instanceof ModelWidgetAction.EntityAnd) {
+                        String entName = ((ModelWidgetAction.EntityAnd) screenOperation).getFinder().getEntityName();
                         if (UtilValidate.isNotEmpty(entName)) allEntityNamesUsed.add(entName);
-                    } else if (screenOperation instanceof ModelScreenAction.EntityCondition) {
-                        String entName = ((ModelScreenAction.EntityCondition) screenOperation).finder.getEntityName();
+                    } else if (screenOperation instanceof ModelWidgetAction.EntityCondition) {
+                        String entName = ((ModelWidgetAction.EntityCondition) screenOperation).getFinder().getEntityName();
                         if (UtilValidate.isNotEmpty(entName)) allEntityNamesUsed.add(entName);
-                    } else if (screenOperation instanceof ModelScreenAction.GetRelated) {
-                        String relationName = ((ModelScreenAction.GetRelated) screenOperation).relationName;
+                    } else if (screenOperation instanceof ModelWidgetAction.GetRelated) {
+                        String relationName = ((ModelWidgetAction.GetRelated) screenOperation).getRelationName();
                         if (UtilValidate.isNotEmpty(relationName)) allEntityNamesUsed.add(relationName);
-                    } else if (screenOperation instanceof ModelScreenAction.GetRelatedOne) {
-                        String relationName = ((ModelScreenAction.GetRelatedOne) screenOperation).relationName;
+                    } else if (screenOperation instanceof ModelWidgetAction.GetRelatedOne) {
+                        String relationName = ((ModelWidgetAction.GetRelatedOne) screenOperation).getRelationName();
                         if (UtilValidate.isNotEmpty(relationName)) allEntityNamesUsed.add(relationName);
                     }
                 }

Modified: ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java?rev=960512&r1=960511&r2=960512&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java (original)
+++ ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java Mon Jul  5 10:07:56 2010
@@ -68,6 +68,7 @@ import org.w3c.dom.Element;
  * Widget Library - Screen model class
  */
 @SuppressWarnings("serial")
+@Deprecated
 public abstract class ModelScreenAction implements Serializable {
     public static final String module = ModelScreenAction.class.getName();
 
@@ -78,8 +79,10 @@ public abstract class ModelScreenAction
         if (Debug.verboseOn()) Debug.logVerbose("Reading Screen action with name: " + actionElement.getNodeName(), module);
     }
 
+    @Deprecated
     public abstract void runAction(Map<String, Object> context) throws GeneralException;
 
+    @Deprecated
     public static List<ModelScreenAction> readSubActions(ModelScreen modelScreen, Element parentElement) {
         List<ModelScreenAction> actions = FastList.newInstance();
 
@@ -113,6 +116,7 @@ public abstract class ModelScreenAction
         return actions;
     }
 
+    @Deprecated
     public static void runSubActions(List<ModelScreenAction> actions, Map<String, Object> context) throws GeneralException {
         if (actions == null) return;
 
@@ -122,6 +126,7 @@ public abstract class ModelScreenAction
         }
     }
 
+    @Deprecated
     public static class SetField extends ModelScreenAction {
         protected FlexibleMapAccessor<Object> field;
         protected FlexibleMapAccessor<Object> fromField;
@@ -282,6 +287,7 @@ public abstract class ModelScreenAction
         }
     }
 
+    @Deprecated
     public static class PropertyMap extends ModelScreenAction {
         protected FlexibleStringExpander resourceExdr;
         protected FlexibleMapAccessor<ResourceBundleMapWrapper> mapNameAcsr;
@@ -337,6 +343,7 @@ public abstract class ModelScreenAction
         }
     }
 
+    @Deprecated
     public static class PropertyToField extends ModelScreenAction {
 
         protected FlexibleStringExpander resourceExdr;
@@ -394,6 +401,7 @@ public abstract class ModelScreenAction
         }
     }
 
+    @Deprecated
     public static class Script extends ModelScreenAction {
         protected static final Object[] EMPTY_ARGS = {};
         protected String location;
@@ -442,6 +450,7 @@ public abstract class ModelScreenAction
         }
     }
 
+    @Deprecated
     public static class Service extends ModelScreenAction {
         protected FlexibleStringExpander serviceNameExdr;
         protected FlexibleMapAccessor<Map<String, Object>> resultMapNameAcsr;
@@ -519,6 +528,7 @@ public abstract class ModelScreenAction
         }
     }
 
+    @Deprecated
     public static class EntityOne extends ModelScreenAction {
         protected PrimaryKeyFinder finder;
 
@@ -539,6 +549,7 @@ public abstract class ModelScreenAction
         }
     }
 
+    @Deprecated
     public static class EntityAnd extends ModelScreenAction {
         protected ByAndFinder finder;
 
@@ -559,6 +570,7 @@ public abstract class ModelScreenAction
         }
     }
 
+    @Deprecated
     public static class EntityCondition extends ModelScreenAction {
         ByConditionFinder finder;
 
@@ -579,6 +591,7 @@ public abstract class ModelScreenAction
         }
     }
 
+    @Deprecated
     public static class GetRelatedOne extends ModelScreenAction {
         protected FlexibleMapAccessor<Object> valueNameAcsr;
         protected FlexibleMapAccessor<Object> toValueNameAcsr;
@@ -623,6 +636,7 @@ public abstract class ModelScreenAction
 
     }
 
+    @Deprecated
     public static class GetRelated extends ModelScreenAction {
         protected FlexibleMapAccessor<Object> valueNameAcsr;
         protected FlexibleMapAccessor<List<GenericValue>> listNameAcsr;

Modified: ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java?rev=960512&r1=960511&r2=960512&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java (original)
+++ ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java Mon Jul  5 10:07:56 2010
@@ -45,6 +45,7 @@ import org.ofbiz.entity.Delegator;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.GenericValue;
 import org.ofbiz.widget.ModelWidget;
+import org.ofbiz.widget.ModelWidgetAction;
 import org.ofbiz.widget.WidgetFactory;
 import org.ofbiz.widget.WidgetWorker;
 import org.ofbiz.widget.form.FormFactory;
@@ -131,7 +132,7 @@ public abstract class ModelScreenWidget
     public static class Section extends ModelScreenWidget {
         public static final String TAG_NAME = "section";
         protected ModelScreenCondition condition;
-        protected List<ModelScreenAction> actions;
+        protected List<ModelWidgetAction> actions;
         protected List<ModelScreenWidget> subWidgets;
         protected List<ModelScreenWidget> failWidgets;
         public boolean isMainSection = false;
@@ -148,7 +149,7 @@ public abstract class ModelScreenWidget
             // read all actions under the "actions" element
             Element actionsElement = UtilXml.firstChildElement(sectionElement, "actions");
             if (actionsElement != null) {
-                this.actions = ModelScreenAction.readSubActions(modelScreen, actionsElement);
+                this.actions = ModelWidgetAction.readSubActions(modelScreen, actionsElement);
             }
 
             // read sub-widgets
@@ -177,7 +178,7 @@ public abstract class ModelScreenWidget
             // if condition does not exist or evals to true run actions and render widgets, otherwise render fail-widgets
             if (condTrue) {
                 // run the actions only if true
-                ModelScreenAction.runSubActions(this.actions, context);
+                ModelWidgetAction.runSubActions(this.actions, context);
 
                 try {
                     // section by definition do not themselves do anything, so this method will generally do nothing, but we'll call it anyway

Modified: ofbiz/branches/jquery/framework/widget/templates/foFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/templates/foFormMacroLibrary.ftl?rev=960512&r1=960511&r2=960512&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/widget/templates/foFormMacroLibrary.ftl (original)
+++ ofbiz/branches/jquery/framework/widget/templates/foFormMacroLibrary.ftl Mon Jul  5 10:07:56 2010
@@ -36,8 +36,10 @@ under the License.
     <#assign foStyle = foStyles[style]?default("")/>
     ${foStyle?default("")}
 </#macro>
-<#macro makeBlock style text><fo:block<#if style?has_content> <@getFoStyle style/></#if>><#if text?exists>${text}</#if></fo:block></#macro>
 
+<#escape x as x?xml>
+
+<#macro makeBlock style text><fo:block<#if style?has_content> <@getFoStyle style/></#if>><#if text?exists>${text}</#if></fo:block></#macro>
 
 <#macro renderField text><#if text?exists>${text}</#if></#macro>
 
@@ -71,7 +73,7 @@ under the License.
 <#macro renderHiddenField name value id event action></#macro>
 <#macro renderIgnoredField></#macro>
 
-<#macro renderFieldTitle style title id fieldHelpText="">${title?default("")}</#macro>
+<#macro renderFieldTitle style title id fieldHelpText="">${title?default("")?replace("&nbsp;", " ")}</#macro>
 <#macro renderSingleFormFieldTitle title>${title?default("")}</#macro>
     
 <#macro renderFormOpen linkUrl formType targetWindow containerId containerStyle autocomplete name useRowSubmit></#macro>
@@ -138,3 +140,4 @@ under the License.
 <#macro makeHyperlinkString linkStyle hiddenFormName event action imgSrc title alternate linkUrl targetWindow description confirmation><@makeBlock linkStyle description /></#macro>
 <#macro renderTooltip tooltip tooltipStyle></#macro>
 <#macro renderAsterisks requiredField requiredStyle></#macro>
+</#escape>

Modified: ofbiz/branches/jquery/framework/widget/templates/foScreenMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/templates/foScreenMacroLibrary.ftl?rev=960512&r1=960511&r2=960512&view=diff
==============================================================================
--- ofbiz/branches/jquery/framework/widget/templates/foScreenMacroLibrary.ftl (original)
+++ ofbiz/branches/jquery/framework/widget/templates/foScreenMacroLibrary.ftl Mon Jul  5 10:07:56 2010
@@ -35,6 +35,8 @@ under the License.
     ${foStyle?default("")}
 </#macro>
 
+<#escape x as x?xml>
+
 <#macro renderScreenBegin>
 <?xml version="1.0" encoding="UTF-8"?>
 </#macro>
@@ -58,12 +60,14 @@ under the License.
 
 <#macro renderHorizontalSeparator id style><fo:block><fo:leader leader-length="100%" leader-pattern="rule" rule-style="solid" rule-thickness="0.1mm" color="black"/></fo:block></#macro>
 <#macro renderLabel text id style><#if text?exists><#if style?has_content><fo:inline <@getFoStyle style/>></#if>${text}<#if style?has_content></fo:inline></#if></#if></#macro>
-<#macro renderLink></#macro>
-<#macro renderImage></#macro>
+<#macro renderLink parameterList targetWindow target uniqueItemName linkType actionUrl id style name linkUrl text imgStr></#macro>
+<#macro renderImage src id style wid hgt border alt urlString></#macro>
 
 <#macro renderContentFrame></#macro>
 <#macro renderScreenletBegin id title collapsible saveCollapsed collapsibleAreaId expandToolTip collapseToolTip fullUrlString padded menuString showMore collapsed javaScriptEnabled></#macro>
 <#macro renderScreenletSubWidget></#macro>
 <#macro renderScreenletEnd></#macro>
 
-<#macro renderScreenletPaginateMenu lowIndex actualPageSize ofLabel listSize paginateLastStyle lastLinkUrl paginateLastLabel paginateNextStyle nextLinkUrl paginateNextLabel paginatePreviousStyle paginatePreviousLabel previousLinkUrl paginateFirstStyle paginateFirstLabel firstLinkUrl></#macro>
\ No newline at end of file
+<#macro renderScreenletPaginateMenu lowIndex actualPageSize ofLabel listSize paginateLastStyle lastLinkUrl paginateLastLabel paginateNextStyle nextLinkUrl paginateNextLabel paginatePreviousStyle paginatePreviousLabel previousLinkUrl paginateFirstStyle paginateFirstLabel firstLinkUrl></#macro>
+</#escape>
+

Modified: ofbiz/branches/jquery/macros.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/macros.xml?rev=960512&r1=960511&r2=960512&view=diff
==============================================================================
--- ofbiz/branches/jquery/macros.xml (original)
+++ ofbiz/branches/jquery/macros.xml Mon Jul  5 10:07:56 2010
@@ -45,7 +45,7 @@ under the License.
   <pathelement location="${ofbiz.home.dir}/framework/base/lib/commons/commons-cli-1.0.jar"/>
   <pathelement location="${ofbiz.home.dir}/framework/base/lib/scripting/antlr-2.7.6.jar"/>
   <pathelement location="${ofbiz.home.dir}/framework/base/lib/scripting/asm-3.2.jar"/>
-  <pathelement location="${ofbiz.home.dir}/framework/base/lib/scripting/groovy-1.7-rc-2.jar"/>
+  <pathelement location="${ofbiz.home.dir}/framework/base/lib/scripting/groovy-all-1.7.3.jar"/>
  </path>
  <path id="ant.lib.class.path">
   <pathelement location="${ofbiz.home.dir}/framework/base/lib/ant/ant-nodeps-1.7.1.jar"/>

Modified: ofbiz/branches/jquery/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/web.xml?rev=960512&r1=960511&r2=960512&view=diff
==============================================================================
--- ofbiz/branches/jquery/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/web.xml (original)
+++ ofbiz/branches/jquery/specialpurpose/assetmaint/webapp/assetmaint/WEB-INF/web.xml Mon Jul  5 10:07:56 2010
@@ -69,7 +69,7 @@
         </init-param>
         <init-param>
             <param-name>allowedPaths</param-name>
-            <param-value>/control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images:/includes/maincss.css</param-value>
+            <param-value>/error:/control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images:/includes/maincss.css</param-value>
         </init-param>
         <init-param>
             <param-name>errorCode</param-name>

Modified: ofbiz/branches/jquery/specialpurpose/assetmaint/webapp/ismgr/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/assetmaint/webapp/ismgr/WEB-INF/web.xml?rev=960512&r1=960511&r2=960512&view=diff
==============================================================================
--- ofbiz/branches/jquery/specialpurpose/assetmaint/webapp/ismgr/WEB-INF/web.xml (original)
+++ ofbiz/branches/jquery/specialpurpose/assetmaint/webapp/ismgr/WEB-INF/web.xml Mon Jul  5 10:07:56 2010
@@ -69,7 +69,7 @@
         </init-param>
         <init-param>
             <param-name>allowedPaths</param-name>
-            <param-value>/control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images:/includes/maincss.css</param-value>
+            <param-value>/error:/control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images:/includes/maincss.css</param-value>
         </init-param>
         <init-param>
             <param-name>errorCode</param-name>

Modified: ofbiz/branches/jquery/specialpurpose/cmssite/template/cms/HtmlHead.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/cmssite/template/cms/HtmlHead.ftl?rev=960512&r1=960511&r2=960512&view=diff
==============================================================================
--- ofbiz/branches/jquery/specialpurpose/cmssite/template/cms/HtmlHead.ftl (original)
+++ ofbiz/branches/jquery/specialpurpose/cmssite/template/cms/HtmlHead.ftl Mon Jul  5 10:07:56 2010
@@ -21,20 +21,18 @@ under the License.
 <#assign initialLocale = locale.toString()>
 <head>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-    <title>${(decoratedContent.subcontent.title.render)?default("CMS Site Generic Title (Set subcontent 'title' on your content!)")}</title>
+    <title>${(decoratedContent.subcontent.title.render)!"CMS Site Generic Title (Set subcontent 'title' on your content!)"}</title>
     <link rel="shortcut icon" href="/images/ofbiz.ico" />
     <script language="javascript" src="/images/prototypejs/prototype.js" type="text/javascript"></script>
     <script language="javascript" src="/images/fieldlookup.js" type="text/javascript"></script>
     <script language="javascript" src="/images/selectall.js" type="text/javascript"></script>
     <script language="javascript" src="/images/calendarDateSelect/calendar_date_select.js" type="text/javascript"></script>
-    <#if parameters.userLogin?has_content>
-      <script language="javascript" src="<@ofbizContentUrl>/images/calendarDateSelect/locale/${parameters.userLogin.lastLocale!initialLocale}.js</@ofbizContentUrl>" type="text/javascript"></script>
-    </#if>
+    <script language="javascript" src="<@ofbizContentUrl>/images/calendarDateSelect/locale/${(parameters.userLogin.lastLocale?substring(0,2))!initialLocale?substring(0,2)!'en'}.js</@ofbizContentUrl>" type="text/javascript"></script>
     <link rel="stylesheet" href="/images/ecommain.css" type="text/css"/>
     <link rel="stylesheet" href="/ecommerce/images/blog.css" type="text/css"/>
     <link rel="stylesheet" href="/content/images/contentForum.css" type="text/css"/>
 
-    <meta name="description" content="${(decoratedContent.subcontent.metaDescription.render)?default("")}"/>
-    <meta name="keywords" content="${(decoratedContent.subcontent.metaKeywords.render)?default("")}"/>
+    <meta name="description" content="${(decoratedContent.subcontent.metaDescription.render)!}"/>
+    <meta name="keywords" content="${(decoratedContent.subcontent.metaKeywords.render)!}"/>
 </head>
 <body>

Modified: ofbiz/branches/jquery/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java?rev=960512&r1=960511&r2=960512&view=diff
==============================================================================
--- ofbiz/branches/jquery/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java (original)
+++ ofbiz/branches/jquery/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java Mon Jul  5 10:07:56 2010
@@ -41,6 +41,8 @@ import org.ofbiz.base.util.UtilXml;
 import org.ofbiz.entity.Delegator;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.GenericValue;
+import org.ofbiz.entity.condition.EntityCondition;
+import org.ofbiz.entity.condition.EntityComparisonOperator;
 import org.ofbiz.entity.util.EntityUtil;
 import org.ofbiz.order.order.OrderChangeHelper;
 import org.ofbiz.order.shoppingcart.CheckOutHelper;
@@ -450,14 +452,14 @@ public class EbayOrderServices {
                             Map<String, Object> orderCtx = FastMap.newInstance();
                             Element ordersElement = (Element) ordersElemIter.next();
                             String externalOrderId = UtilXml.childElementValue(ordersElement, "OrderID");
-                            GenericValue orderExist = externalOrderExists(delegator, externalOrderId);
+                            orderCtx.put("externalId", "EBO_" + externalOrderId);
+                            GenericValue orderExist = externalOrderExists(delegator, (String)orderCtx.get("externalId"));
                             if (orderExist != null) {
-                                orderCtx.put("orderId", (String) orderExist.get("orderId"));
+                                orderCtx.put("orderId", (String)orderExist.get("orderId"));
                             } else {
                                 orderCtx.put("orderId", "");
                             }
 
-                            orderCtx.put("externalId", externalOrderId);
                             orderCtx.put("amountPaid", UtilXml.childElementValue(ordersElement, "Total", "0"));
                             String createdDate = UtilXml.childElementValue(ordersElement, "CreatedTime");
                             if (UtilValidate.isNotEmpty(createdDate)) {
@@ -823,6 +825,7 @@ public class EbayOrderServices {
                             }
                             orderCtx.put("externalTransactionCtx", externalTransactionCtx);
 
+                            String quantityPurchased = UtilXml.childElementValue(transactionElement, "QuantityPurchased", "");
                             // retrieve item
                             List<Map<String, Object>> orderItemList = FastList.newInstance();
                             String itemId = "";
@@ -833,7 +836,7 @@ public class EbayOrderServices {
                                 Element itemElement = (Element)itemElemIter.next();
                                 itemId = UtilXml.childElementValue(itemElement, "ItemID", "");
                                 orderItemCtx.put("paymentMethods", UtilXml.childElementValue(itemElement, "PaymentMethods", ""));
-                                orderItemCtx.put("quantity", UtilXml.childElementValue(itemElement, "Quantity", "0"));
+                                orderItemCtx.put("quantity", quantityPurchased);
                                 orderItemCtx.put("startPrice", UtilXml.childElementValue(itemElement, "StartPrice", "0"));
                                 orderItemCtx.put("title", UtilXml.childElementValue(itemElement, "Title", ""));
 
@@ -862,9 +865,14 @@ public class EbayOrderServices {
                             String transactionId = UtilXml.childElementValue(transactionElement, "TransactionID", "");
 
                             // set the externalId
-                            orderCtx.put("externalId", transactionId);
+                            if ("0".equals(transactionId)) {
+                                // this is a Chinese Auction: ItemID is used to uniquely identify the transaction
+                                orderCtx.put("externalId", "EBI_" + itemId);
+                            } else {
+                                orderCtx.put("externalId", "EBT_" + transactionId);
+                            }
 
-                            GenericValue orderExist = externalOrderExists(delegator, transactionId);
+                            GenericValue orderExist = externalOrderExists(delegator, (String)orderCtx.get("externalId"));
                             if (orderExist != null) {
                                 orderCtx.put("orderId", (String) orderExist.get("orderId"));
                             } else {
@@ -1230,7 +1238,8 @@ public class EbayOrderServices {
     private static GenericValue externalOrderExists(Delegator delegator, String externalId) throws GenericEntityException {
         Debug.logInfo("Checking for existing externalId: " + externalId, module);
         GenericValue orderHeader = null;
-        List<GenericValue> orderHeaderList = delegator.findByAnd("OrderHeader", UtilMisc.toMap("externalId", externalId));
+        EntityCondition condition = EntityCondition.makeCondition(UtilMisc.toList(EntityCondition.makeCondition("externalId", EntityComparisonOperator.EQUALS, externalId), EntityCondition.makeCondition("statusId", EntityComparisonOperator.NOT_EQUAL, "ORDER_CANCELLED")), EntityComparisonOperator.AND);
+        List<GenericValue> orderHeaderList = delegator.findList("OrderHeader", condition, null, null, null, true);
         if (UtilValidate.isNotEmpty(orderHeaderList)) {
             orderHeader = EntityUtil.getFirst(orderHeaderList);
         }

Modified: ofbiz/branches/jquery/specialpurpose/ebay/src/org/ofbiz/ebay/ImportOrdersFromEbay.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebay/src/org/ofbiz/ebay/ImportOrdersFromEbay.java?rev=960512&r1=960511&r2=960512&view=diff
==============================================================================
--- ofbiz/branches/jquery/specialpurpose/ebay/src/org/ofbiz/ebay/ImportOrdersFromEbay.java (original)
+++ ofbiz/branches/jquery/specialpurpose/ebay/src/org/ofbiz/ebay/ImportOrdersFromEbay.java Mon Jul  5 10:07:56 2010
@@ -40,6 +40,8 @@ import org.ofbiz.entity.Delegator;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.entity.condition.EntityCondition;
+import org.ofbiz.entity.condition.EntityComparisonOperator;
 import org.ofbiz.order.order.OrderChangeHelper;
 import org.ofbiz.order.shoppingcart.CheckOutHelper;
 import org.ofbiz.order.shoppingcart.ShoppingCart;
@@ -89,7 +91,6 @@ public class ImportOrdersFromEbay {
             order.put("productStoreId", (String) context.get("productStoreId"));
             order.put("userLogin", (GenericValue) context.get("userLogin"));
             order.put("externalId", (String) context.get("externalId"));
-            order.put("transactionId", (String) context.get("transactionId"));
             order.put("createdDate", (String) context.get("createdDate"));
             order.put("productId", (String) context.get("productId"));
             order.put("quantityPurchased", (String) context.get("quantityPurchased"));
@@ -128,7 +129,6 @@ public class ImportOrdersFromEbay {
         Locale locale = (Locale) context.get("locale");
         String orderId = (String) context.get("orderId");
         String externalId = (String) context.get("externalId");
-        String transactionId = (String) context.get("transactionId");
         Map<String, Object> result = FastMap.newInstance();
         try {
             if (orderId == null && externalId == null) {
@@ -151,9 +151,8 @@ public class ImportOrdersFromEbay {
                     return ServiceUtil.returnSuccess();
                 }
 
-                // get externalId and transactionId from OrderHeader
+                // get externalId from OrderHeader
                 externalId = (String)orderHeader.get("externalId");
-                transactionId = (String)orderHeader.get("transactionId");
                 String productStoreId = (String) orderHeader.get("productStoreId");
                 if (UtilValidate.isNotEmpty(productStoreId)) {
                     context.put("productStoreId", productStoreId);
@@ -164,7 +163,7 @@ public class ImportOrdersFromEbay {
 
             StringBuffer completeSaleXml = new StringBuffer();
 
-            if (!ServiceUtil.isFailure(buildCompleteSaleRequest(delegator, locale, externalId, transactionId, context, completeSaleXml, eBayConfigResult.get("token").toString()))) {
+            if (!ServiceUtil.isFailure(buildCompleteSaleRequest(delegator, locale, externalId, context, completeSaleXml, eBayConfigResult.get("token").toString()))) {
                 result = EbayHelper.postItem(eBayConfigResult.get("xmlGatewayUri").toString(), completeSaleXml, eBayConfigResult.get("devID").toString(), eBayConfigResult.get("appID").toString(), eBayConfigResult.get("certID").toString(), "CompleteSale", eBayConfigResult.get("compatibilityLevel").toString(), eBayConfigResult.get("siteID").toString());
                 String successMessage = (String)result.get("successMessage");
                 if (successMessage != null) {
@@ -248,13 +247,12 @@ public class ImportOrdersFromEbay {
          return ServiceUtil.returnSuccess();
     }
 
-    public static Map<String, Object> buildCompleteSaleRequest(Delegator delegator, Locale locale, String itemId, String transactionId, Map<String, Object> context, StringBuffer dataItemsXml, String token) {
+    public static Map<String, Object> buildCompleteSaleRequest(Delegator delegator, Locale locale, String transactionId, Map<String, Object> context, StringBuffer dataItemsXml, String token) {
         String paid = (String)context.get("paid");
         String shipped = (String)context.get("shipped");
 
         try {
-            if (itemId == null && transactionId == null) {
-                Debug.logError("Cannot retrieve itemId and transactionId from externalId", module);
+            if (transactionId == null) {
                 return ServiceUtil.returnFailure(UtilProperties.getMessage(resource, "ordersImportFromEbay.errorDuringBuildItemAndTransactionIdFromExternalId", locale));
             }
 
@@ -264,7 +262,17 @@ public class ImportOrdersFromEbay {
 
             EbayHelper.appendRequesterCredentials(transElem, transDoc, token);
 
-            UtilXml.addChildElementValue(transElem, "ItemID", itemId, transDoc);
+            if (transactionId.startsWith("EBT_")) {
+                UtilXml.addChildElementValue(transElem, "TransactionID", transactionId.substring(4), transDoc);
+                UtilXml.addChildElementValue(transElem, "ItemID", "0", transDoc);
+            } else if (transactionId.startsWith("EBO_")) {
+                UtilXml.addChildElementValue(transElem, "OrderID", transactionId.substring(4), transDoc);
+                UtilXml.addChildElementValue(transElem, "TransactionID", "0", transDoc);
+                UtilXml.addChildElementValue(transElem, "ItemID", "0", transDoc);
+            } else if (transactionId.startsWith("EBI_")) {
+                UtilXml.addChildElementValue(transElem, "ItemID", transactionId.substring(4), transDoc);
+                UtilXml.addChildElementValue(transElem, "TransactionID", "0", transDoc);
+            }
 
             // default shipped = Y (call from eca during order completed)
             if (paid == null && shipped == null) {
@@ -291,8 +299,6 @@ public class ImportOrdersFromEbay {
                 UtilXml.addChildElementValue(transElem, "Shipped", shipped, transDoc);
             }
 
-            UtilXml.addChildElementValue(transElem, "TransactionID", (transactionId==null? "0": transactionId), transDoc);
-
             dataItemsXml.append(UtilXml.writeXmlDocument(transDoc));
         } catch (Exception e) {
             Debug.logError("Exception during building complete sale request", module);
@@ -486,11 +492,15 @@ public class ImportOrdersFromEbay {
                             // retrieve transactionId
                             String transactionId = UtilXml.childElementValue(transactionElement, "TransactionID", "");
 
-                            // set the externalId and transactionId
-                            order.put("externalId", itemId);
-                            order.put("transactionId", transactionId);
+                            // set the externalId
+                            if ("0".equals(transactionId)) {
+                                // this is a Chinese Auction: ItemID is used to uniquely identify the transaction
+                                order.put("externalId", "EBI_" + itemId);
+                            } else {
+                                order.put("externalId", "EBT_" + transactionId);
+                            }
 
-                            GenericValue orderExist = externalOrderExists(delegator, itemId, transactionId);
+                            GenericValue orderExist = externalOrderExists(delegator, (String)order.get("externalId"));
                             if (orderExist != null) {
                                 order.put("orderId", (String)orderExist.get("orderId"));
                             } else {
@@ -598,15 +608,11 @@ public class ImportOrdersFromEbay {
             // set the external id with the eBay Item Id
             String externalId = (String) parameters.get("externalId");
 
-            // set the transaction id with the eBay Transacation Id
-            String transactionId = (String) parameters.get("transactionId");
-
             if (UtilValidate.isNotEmpty(externalId)) {
-                if (externalOrderExists(delegator, externalId, transactionId) != null && create) {
+                if (externalOrderExists(delegator, externalId) != null && create) {
                     return ServiceUtil.returnFailure(UtilProperties.getMessage(resource, "ordersImportFromEbay.externalIdAlreadyExist", locale));
                 }
                 cart.setExternalId(externalId);
-                cart.setTransactionId(transactionId);
             } else {
                 return ServiceUtil.returnFailure(UtilProperties.getMessage(resource, "ordersImportFromEbay.externalIdNotAvailable", locale));
             }
@@ -806,12 +812,13 @@ public class ImportOrdersFromEbay {
     }
 
 
-    private static GenericValue externalOrderExists(Delegator delegator, String externalId, String transactionId) throws GenericEntityException {
-        Debug.logInfo("Checking for existing externalId: " + externalId +" and transactionId: " + transactionId, module);
+    private static GenericValue externalOrderExists(Delegator delegator, String externalId) throws GenericEntityException {
+        Debug.logInfo("Checking for existing externalId: " + externalId, module);
         GenericValue orderHeader = null;
-        List<GenericValue> entities = delegator.findByAnd("OrderHeader", UtilMisc.toMap("externalId", externalId, "transactionId", transactionId));
-        if (UtilValidate.isNotEmpty(entities)) {
-            orderHeader = EntityUtil.getFirst(entities);
+        EntityCondition condition = EntityCondition.makeCondition(UtilMisc.toList(EntityCondition.makeCondition("externalId", EntityComparisonOperator.EQUALS, externalId), EntityCondition.makeCondition("statusId", EntityComparisonOperator.NOT_EQUAL, "ORDER_CANCELLED")), EntityComparisonOperator.AND);
+        List<GenericValue> orderHeaderList = delegator.findList("OrderHeader", condition, null, null, null, true);
+        if (UtilValidate.isNotEmpty(orderHeaderList)) {
+            orderHeader = EntityUtil.getFirst(orderHeaderList);
         }
         return orderHeader;
     }

Modified: ofbiz/branches/jquery/specialpurpose/ebay/webapp/ebay/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebay/webapp/ebay/WEB-INF/web.xml?rev=960512&r1=960511&r2=960512&view=diff
==============================================================================
--- ofbiz/branches/jquery/specialpurpose/ebay/webapp/ebay/WEB-INF/web.xml (original)
+++ ofbiz/branches/jquery/specialpurpose/ebay/webapp/ebay/WEB-INF/web.xml Mon Jul  5 10:07:56 2010
@@ -54,7 +54,7 @@ under the License.
         </init-param>
         <init-param>
             <param-name>allowedPaths</param-name>
-            <param-value>/control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images:/includes/maincss.css</param-value>
+            <param-value>/error:/control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images:/includes/maincss.css</param-value>
         </init-param>
         <init-param>
             <param-name>errorCode</param-name>

Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/data/DemoEbayStoreData.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/data/DemoEbayStoreData.xml?rev=960512&r1=960511&r2=960512&view=diff
==============================================================================
--- ofbiz/branches/jquery/specialpurpose/ebaystore/data/DemoEbayStoreData.xml (original)
+++ ofbiz/branches/jquery/specialpurpose/ebaystore/data/DemoEbayStoreData.xml Mon Jul  5 10:07:56 2010
@@ -19,15 +19,17 @@
 -->
 
 <entity-engine-xml>
-    <!-- Ebay Store Demo Data -->
-    <Party partyId="DemoEbayAccount" partyTypeId="PERSON"/>
-    <Person partyId="DemoEbayAccount" firstName="Demo ebay account" lastName="USA"/>
-    <PartyRole partyId="DemoEbayAccount" roleTypeId="EBAY_ACCOUNT"/>
-    <PartyRole partyId="DemoEbayAccount" roleTypeId="VENDOR"/>
-    <PartyRole partyId="DemoEbayAccount" roleTypeId="OWNER"/>
-    <UserLogin userLoginId="esandbox10543" partyId="DemoEbayAccount" currentPassword="{SHA}bbf272ce445e1c48d94096afdba6a7888c1df1fe"/>
-    <ProductStore productStoreId="90100" storeName="OFBiz Ebay Store-USA" companyName="Apache Ofbiz" title="Test esandbox10543 store"
-        subtitle="Part of the Open For Business Family of Open Source Software" payToPartyId="DemoEbayAccount" daysToCancelNonPay="30" prorateShipping="Y" prorateTaxes="Y"
+    <!-- ===================== -->
+    <!-- Ebay Store Demo1 Data -->
+    <!-- ===================== -->
+    <Party partyId="DemoEbayAccount1" partyTypeId="PERSON"/>
+    <Person partyId="DemoEbayAccount1" firstName="Demo1 ebay account" lastName="AU"/>
+    <PartyRole partyId="DemoEbayAccount1" roleTypeId="EBAY_ACCOUNT"/>
+    <PartyRole partyId="DemoEbayAccount1" roleTypeId="VENDOR"/>
+    <PartyRole partyId="DemoEbayAccount1" roleTypeId="OWNER"/>
+    <UserLogin userLoginId="testuser_ofbiz1" partyId="DemoEbayAccount1" currentPassword="{SHA}bbf272ce445e1c48d94096afdba6a7888c1df1fe"/>
+    <ProductStore productStoreId="90101" storeName="OFBiz Ebay Store1-AU" companyName="Apache Ofbiz" title="Test OFBiz store1"
+        subtitle="Part of the Open For Business Family of Open Source Software" payToPartyId="DemoEbayAccount1" daysToCancelNonPay="30" prorateShipping="Y" prorateTaxes="Y"
         inventoryFacilityId="WebStoreWarehouse" oneInventoryFacility="Y" checkInventory="Y" reserveInventory="Y" balanceResOnOrderCreation="Y" reserveOrderEnumId="INVRO_FIFO_REC" requireInventory="N"
         defaultLocaleString="en_US" defaultCurrencyUomId="USD" defaultSalesChannelEnumId="EBAY_SALES_CHANNEL" allowPassword="Y" explodeOrderItems="N" retryFailedAuths="Y" reqReturnInventoryReceive="N"
         headerApprovedStatus="ORDER_APPROVED" itemApprovedStatus="ITEM_APPROVED" digitalItemApprovedStatus="ITEM_APPROVED" headerDeclinedStatus="ORDER_REJECTED"
@@ -37,64 +39,143 @@
         authErrorMessage="Problem connecting to payment processor; we will continue to retry and notify you by email."
         storeCreditValidDays="90" storeCreditAccountEnumId="FIN_ACCOUNT"
         visualThemeId="EC_DEFAULT" prodSearchExcludeVariants="Y" autoApproveInvoice="Y" shipIfCaptureFails="Y" autoApproveOrder="Y" showOutOfStockProducts="Y"/>
-    <ProductStoreRole partyId="DemoEbayAccount" roleTypeId="EBAY_ACCOUNT" productStoreId="90100" fromDate="2010-01-01 16:19:47.058"/>
-    <ProductStoreCatalog productStoreId="90100" prodCatalogId="eBayCatalog" fromDate="2010-01-01 16:19:47.058"/>
-    <ProductStoreFacility productStoreId="90100" facilityId="WebStoreWarehouse" fromDate="2010-01-01 16:19:47.058"/>
-
-    <WebSite webSiteId="EBAY_STORE" siteName="eBay Store" standardContentPrefix="http://demo.ofbiz.org" productStoreId="90100"/>
-    <EbayConfig productStoreId="90100" devId="f3586481-93c7-4aaf-ab87-d383d56b71b1" appId="antwebc0f-9bf9-4829-998b-e5e8fb773ac" certId="7f363bc0-11d6-489a-a54d-4a44de82f790" compatibilityLevel="643" siteId="0" xmlGatewayUri="https://api.sandbox.ebay.com/ws/api.dll"  apiServerUrl="https://api.sandbox.ebay.com/wsapi"  webSiteId="EBAY_STORE">
-        <token><![CDATA[AgAAAA**AQAAAA**aAAAAA**PC5MSw**nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6wJnY+lCZiGoA2dj6x9nY+seQ**0jgBAA**AAMAAA**YxqcpdWbgFwYg1G+3AhOonR2/yllz3IJ5VoJyU75texuETwabGgsN4f6OfeBGWejUx10heCKG7wcM4JI+Fqk8Zg64L51JL3/Vm7dYo8VHd8wfixWIdMmhheYFwOdBtxcTb93NLeJa6uxvBJYrSS7O0RcQ3KPhOVJvt7KfVT009o2/02tuX7vbMoHV+Meszli4eVAnB9Fbt6ag2nq46+2/AzMIO4rZE23ozLfh6c4W+QkD6BcaFzLmhVE+7Ni9y7y26QHfUUdjBOEF6ewLpZJsSIoQZC9y4J/yF15Ann9NiamtmFj5IeX4uNIKegEt8EwFSqtpxjgVngcAmMaM8/hk9uQVnFKHTjhK3koUrT7zu/+tk2twJfGF9odb+/5uTVJZ8Lywl/LwEdadv2wjpTdQqHF2bV84cSRhOKrlsYr9xFqgqNDpnmCFXkQKGhycWzMzxcBmiRT5VXJfBjbTGGdmfAf7TVcoU/4C3F3kvzEJhcxU9WbMvj58TmW+VvYS7oy4kOyTiyr3alkz/+HJYGIuttnkzqsIVIPaSXyyuFNWQmQL+0GlJ1n7EoKCevuVsTYgayQEN39TPeXg8ADmf5Pf19BlPxRFNkKvANxE0k3ac+whUwpkfBgx6lApOcwKQMXioi7NrN3MROL/1qrO2+N5sl4kr9nbuvEk9mPDJnmNdB7lzgoESo+se3ZmY9KJ6v08uQ02N1/SjHtmeiojayaR/DqeJiFSoAnU4winzA5GQGNjzEHUpSf1Kj+IZudhT9r]]></token>
+    <ProductStoreRole partyId="DemoEbayAccount1" roleTypeId="EBAY_ACCOUNT" productStoreId="90101" fromDate="2010-01-01 16:19:47.058"/>
+    <ProductStoreCatalog productStoreId="90101" prodCatalogId="eBayCatalog" fromDate="2010-01-01 16:19:47.058"/>
+    <ProductStoreFacility productStoreId="90101" facilityId="WebStoreWarehouse" fromDate="2010-01-01 16:19:47.058"/>
+
+    <WebSite webSiteId="EBAY_STORE1" siteName="eBay Store1" standardContentPrefix="http://demo.ofbiz.org" productStoreId="90101"/>
+    <EbayConfig productStoreId="90101" devId="9f4e7862-1396-4ce3-a1e4-3eaf287ea930" appId="Company0-cd63-4e3c-83f6-d426f7d92f6f" certId="bf73e23e-f04b-4fbc-88f9-da6952a8150d" compatibilityLevel="643" siteId="0" xmlGatewayUri="https://api.sandbox.ebay.com/ws/api.dll"  apiServerUrl="https://api.sandbox.ebay.com/wsapi"  webSiteId="EBAY_STORE1">
+        <token><![CDATA[AgAAAA**AQAAAA**aAAAAA**ip+5Sw**nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6wFk4CoAJGCqAydj6x9nY+seQ**PkwBAA**AAMAAA**J0SbAVqPUlahSPGG9MiqBFBewiqcQ5249jACRMmke/XoqR0m0CgFR7qtleDZVbC9Y4NYwsO8ZQE7pNi8lE5LaBtUgfeGFq5sygZ3V0X/s7mNljhieX54GvgUw1AsMn3CIuE5wYDQfrdFtga6mYcPUTS+HgmnGSGhhxhSEYPOv2kR5id7+deNgsvLtgEQT9rWhMmDf9GZMLJsiRqAy86spRVFjROhTapwTRbuLf4YDQc8iv4hu9Q7V6wZTpbxL3tvmW1VNnMo4V8dUDy47nh1pEVF7px6+Mi80ADE3+uGlFHpCIG4POWXMXa3Q/v2jq0AEidK9Aw79+CcrwVumfH8bfka5sxGjJ1Jszr8txzfbS/Ns3n9ITlMcW8UxglP/VUV7jWAK2e0tmwlzthVdDbR8O21oKyczHkOIQcdm9ANLjK9/HBwjCO9Rp4tge3qFp3UMTtexTHWjrbbmVaaNcHS6upcGVmJp8VvT5y0HrFD8RUGHF2DChJbAbHkmnCmf8N9iytlSTVwjYy4ksEr0u0OHr2uLidAD8oOOZBntKKe4PHJUiZusMG/uW/QbSV1UTxgDPTfxTjWO1TiYqT27UkPpKztEvAYi+865ayy9ET9Ys1jtk4VwCcFkfOKDbvtNwXwRvc3R4dixWahV/WobUKM7qqY8s0xdJw1MwZ95udHK3tz0ChyC1p3ww92V7cFcabkbODDUJdjblHVQW+hzTHt1J/jZdkJupbmDDKfZcru1hbSQOqT7bl+pifbnDZ/uqiE]]></token>
         <customXml><![CDATA[<custom-xml><Currency>USD</Currency><UseTaxTable>false</UseTaxTable><DispatchTimeMax>3</DispatchTimeMax><ReturnPolicy><ReturnsAcceptedOption>ReturnsNotAccepted</ReturnsAcceptedOption></ReturnPolicy><ShippingDetails><ShippingType>Flat</ShippingType><ShippingServiceOptions><ShippingService>UPS2ndDay</ShippingService><ShippingServicePriority>1</ShippingServicePriority><ShippingServiceCost>5</ShippingServiceCost><ShippingServiceAdditionalCost>2</ShippingServiceAdditionalCost><ShippingSurcharge>1</ShippingSurcharge></ShippingServiceOptions></ShippingDetails></custom-xml>]]></customXml>
     </EbayConfig>
     
     <!-- Automatic Preferences -->
-    <DataResource dataResourceId="EBAY_WIN_BUYER_NOTI" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FTL"/>
-    <ElectronicText dataResourceId="EBAY_WIN_BUYER_NOTI">
+    <DataResource dataResourceId="EBAY_WIN_BUYER_NOTI1" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FTL"/>
+    <ElectronicText dataResourceId="EBAY_WIN_BUYER_NOTI1">
         <textData><![CDATA[
             <span style="color: rgb(255, 51, 0);">
                 Demo : Automatically send a Winning Buyer Notification email to your winning buyer(s) after item has sold.
             </span>]]>
         </textData>
     </ElectronicText>
-    <Content contentId="EBAY_WIN_BUYER_NOTI" contentTypeId="DOCUMENT" dataResourceId="EBAY_WIN_BUYER_NOTI" ownerContentId="EBAY_WIN_BUYER_NOTI" statusId="CTNT_IN_PROGRESS"/>
-    <ContentRole contentId="EBAY_WIN_BUYER_NOTI" partyId="DemoEbayAccount" roleTypeId="OWNER" fromDate="2010-01-01 00:00:00.000"/>
+    <Content contentId="EBAY_WIN_BUYER_NOTI1" contentTypeId="DOCUMENT" dataResourceId="EBAY_WIN_BUYER_NOTI1" statusId="CTNT_IN_PROGRESS"/>
+    <ContentRole contentId="EBAY_WIN_BUYER_NOTI1" partyId="DemoEbayAccount1" roleTypeId="OWNER" fromDate="2010-01-01 00:00:00.000"/>
 
-    <DataResource dataResourceId="EBAY_PAY_RECIEVED" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FTL"/>
-    <ElectronicText dataResourceId="EBAY_PAY_RECIEVED">
+    <DataResource dataResourceId="EBAY_PAY_RECIEVED1" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FTL"/>
+    <ElectronicText dataResourceId="EBAY_PAY_RECIEVED1">
         <textData><![CDATA[
             <span style="color: rgb(255, 51, 0);">
                 Demo : Automatically send Payment Received email when payment has been received.
             </span>]]>
         </textData>
     </ElectronicText>
-    <Content contentId="EBAY_PAY_RECIEVED" contentTypeId="DOCUMENT" dataResourceId="EBAY_PAY_RECIEVED" ownerContentId="EBAY_PAY_RECIEVED" statusId="CTNT_IN_PROGRESS"/>
-    <ContentRole contentId="EBAY_PAY_RECIEVED" partyId="DemoEbayAccount" roleTypeId="OWNER" fromDate="2010-01-01 00:00:00.000"/>
+    <Content contentId="EBAY_PAY_RECIEVED1" contentTypeId="DOCUMENT" dataResourceId="EBAY_PAY_RECIEVED1" statusId="CTNT_IN_PROGRESS"/>
+    <ContentRole contentId="EBAY_PAY_RECIEVED1" partyId="DemoEbayAccount1" roleTypeId="OWNER" fromDate="2010-01-01 00:00:00.000"/>
 
-    <DataResource dataResourceId="EBAY_FEEBACK_REMIN" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FTL"/>
-    <ElectronicText dataResourceId="EBAY_FEEBACK_REMIN">
+    <DataResource dataResourceId="EBAY_FEEBACK_REMIN1" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FTL"/>
+    <ElectronicText dataResourceId="EBAY_FEEBACK_REMIN1">
         <textData><![CDATA[
             <span style="color: rgb(255, 51, 0);">
                 Demo : Automatically send a Feedback Reminder email if feedback has not been received. Please choose how many days after shipping you want this email sent.
             </span>]]>
         </textData>
     </ElectronicText>
-    <Content contentId="EBAY_FEEBACK_REMIN" contentTypeId="DOCUMENT" dataResourceId="EBAY_FEEBACK_REMIN" ownerContentId="EBAY_FEEBACK_REMIN" statusId="CTNT_IN_PROGRESS"/>
-    <ContentRole contentId="EBAY_FEEBACK_REMIN" partyId="DemoEbayAccount" roleTypeId="OWNER" fromDate="2010-01-01 00:00:00.000"/>
+    <Content contentId="EBAY_FEEBACK_REMIN1" contentTypeId="DOCUMENT" dataResourceId="EBAY_FEEBACK_REMIN1" statusId="CTNT_IN_PROGRESS"/>
+    <ContentRole contentId="EBAY_FEEBACK_REMIN1" partyId="DemoEbayAccount1" roleTypeId="OWNER" fromDate="2010-01-01 00:00:00.000"/>
 
-    <DataResource dataResourceId="EBAY_ITEM_DISPATCH" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FTL"/>
-    <ElectronicText dataResourceId="EBAY_ITEM_DISPATCH">
+    <DataResource dataResourceId="EBAY_ITEM_DISPATCH1" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FTL"/>
+    <ElectronicText dataResourceId="EBAY_ITEM_DISPATCH1">
         <textData><![CDATA[
             <span style="color: rgb(255, 51, 0);">
                 Demo : Automatic send item dispatched notification email when user mark sold listing as dispatched.
             </span>]]>
         </textData>
     </ElectronicText>
-    <Content contentId="EBAY_ITEM_DISPATCH" contentTypeId="DOCUMENT" dataResourceId="EBAY_ITEM_DISPATCH" ownerContentId="EBAY_ITEM_DISPATCH" statusId="CTNT_IN_PROGRESS"/>
-    <ContentRole contentId="EBAY_ITEM_DISPATCH" partyId="DemoEbayAccount" roleTypeId="OWNER" fromDate="2010-01-01 00:00:00.000"/>
+    <Content contentId="EBAY_ITEM_DISPATCH1" contentTypeId="DOCUMENT" dataResourceId="EBAY_ITEM_DISPATCH1" statusId="CTNT_IN_PROGRESS"/>
+    <ContentRole contentId="EBAY_ITEM_DISPATCH1" partyId="DemoEbayAccount1" roleTypeId="OWNER" fromDate="2010-01-01 00:00:00.000"/>
 
-    <ProductStoreEmailSetting productStoreId="90100" emailType="EBAY_WIN_BUYER_NOTI" bccAddress="[hidden email]" bodyScreenLocation="component://ebaystore/widget/EbayEmailScreens.xml#WinnigBuyerNotification" fromAddress="[hidden email]" subject="OFBiz Demo - Winnig Buyer Notification #${buyerUserId}" xslfoAttachScreenLocation=""/>
-    <ProductStoreEmailSetting productStoreId="90100" emailType="EBAY_PAY_RECIEVED" bccAddress="[hidden email]" bodyScreenLocation="component://ebaystore/widget/EbayEmailScreens.xml#PaymentRecieved" fromAddress="[hidden email]" subject="OFBiz Demo - PaymentRecieved #${buyerUserId}" xslfoAttachScreenLocation=""/>
-    <ProductStoreEmailSetting productStoreId="90100" emailType="EBAY_FEEBACK_REMIN" bccAddress="[hidden email]" bodyScreenLocation="component://ebaystore/widget/EbayEmailScreens.xml#FeedbackReminder" fromAddress="[hidden email]" subject="OFBiz Demo - Feedback Reminder #${buyerUserId}" xslfoAttachScreenLocation=""/>
-    <ProductStoreEmailSetting productStoreId="90100" emailType="EBAY_ITEM_DISPATCH" bccAddress="[hidden email]" bodyScreenLocation="component://ebaystore/widget/EbayEmailScreens.xml#EbayEmailTemplate" fromAddress="[hidden email]" subject="OFBiz Demo - Item Dispatched Notification #${buyerUserId}" xslfoAttachScreenLocation=""/>
+    <ProductStoreEmailSetting productStoreId="90101" emailType="EBAY_WIN_BUYER_NOTI" bccAddress="[hidden email]" bodyScreenLocation="component://ebaystore/widget/EbayEmailScreens.xml#WinnigBuyerNotification" fromAddress="[hidden email]" subject="OFBiz Demo - Winnig Buyer Notification #${buyerUserId}" xslfoAttachScreenLocation=""/>
+    <ProductStoreEmailSetting productStoreId="90101" emailType="EBAY_PAY_RECIEVED" bccAddress="[hidden email]" bodyScreenLocation="component://ebaystore/widget/EbayEmailScreens.xml#PaymentRecieved" fromAddress="[hidden email]" subject="OFBiz Demo - PaymentRecieved #${buyerUserId}" xslfoAttachScreenLocation=""/>
+    <ProductStoreEmailSetting productStoreId="90101" emailType="EBAY_FEEBACK_REMIN" bccAddress="[hidden email]" bodyScreenLocation="component://ebaystore/widget/EbayEmailScreens.xml#FeedbackReminder" fromAddress="[hidden email]" subject="OFBiz Demo - Feedback Reminder #${buyerUserId}" xslfoAttachScreenLocation=""/>
+    <ProductStoreEmailSetting productStoreId="90101" emailType="EBAY_ITEM_DISPATCH" bccAddress="[hidden email]" bodyScreenLocation="component://ebaystore/widget/EbayEmailScreens.xml#EbayEmailTemplate" fromAddress="[hidden email]" subject="OFBiz Demo - Item Dispatched Notification #${buyerUserId}" xslfoAttachScreenLocation=""/>
+
+    <!-- ===================== -->
+    <!-- Ebay Store Demo2 Data -->
+    <!-- ===================== -->
+    <Party partyId="DemoEbayAccount2" partyTypeId="PERSON"/>
+    <Person partyId="DemoEbayAccount2" firstName="Demo2 ebay account" lastName="AU"/>
+    <PartyRole partyId="DemoEbayAccount2" roleTypeId="EBAY_ACCOUNT"/>
+    <PartyRole partyId="DemoEbayAccount2" roleTypeId="VENDOR"/>
+    <PartyRole partyId="DemoEbayAccount2" roleTypeId="OWNER"/>
+    <UserLogin userLoginId="testuser_ofbiz2" partyId="DemoEbayAccount2" currentPassword="{SHA}bbf272ce445e1c48d94096afdba6a7888c1df1fe"/>
+    <ProductStore productStoreId="90102" storeName="OFBiz Ebay Store2-AU" companyName="Apache Ofbiz" title="Test OFBiz store2"
+        subtitle="Part of the Open For Business Family of Open Source Software" payToPartyId="DemoEbayAccount2" daysToCancelNonPay="30" prorateShipping="Y" prorateTaxes="Y"
+        inventoryFacilityId="WebStoreWarehouse" oneInventoryFacility="Y" checkInventory="Y" reserveInventory="Y" balanceResOnOrderCreation="Y" reserveOrderEnumId="INVRO_FIFO_REC" requireInventory="N"
+        defaultLocaleString="en_US" defaultCurrencyUomId="USD" defaultSalesChannelEnumId="EBAY_SALES_CHANNEL" allowPassword="Y" explodeOrderItems="N" retryFailedAuths="Y" reqReturnInventoryReceive="N"
+        headerApprovedStatus="ORDER_APPROVED" itemApprovedStatus="ITEM_APPROVED" digitalItemApprovedStatus="ITEM_APPROVED" headerDeclinedStatus="ORDER_REJECTED"
+        itemDeclinedStatus="ITEM_REJECTED" headerCancelStatus="ORDER_CANCELLED" itemCancelStatus="ITEM_CANCELLED" orderNumberPrefix="WS"
+        authDeclinedMessage="There has been a problem with your method of payment. Please try a different method or call customer service."
+        authFraudMessage="Your order has been rejected and your account has been disabled due to fraud."
+        authErrorMessage="Problem connecting to payment processor; we will continue to retry and notify you by email."
+        storeCreditValidDays="90" storeCreditAccountEnumId="FIN_ACCOUNT"
+        visualThemeId="EC_DEFAULT" prodSearchExcludeVariants="Y" autoApproveInvoice="Y" shipIfCaptureFails="Y" autoApproveOrder="Y" showOutOfStockProducts="Y"/>
+    <ProductStoreRole partyId="DemoEbayAccount2" roleTypeId="EBAY_ACCOUNT" productStoreId="90102" fromDate="2010-01-01 16:19:47.058"/>
+    <ProductStoreCatalog productStoreId="90102" prodCatalogId="eBayCatalog" fromDate="2010-01-01 16:19:47.058"/>
+    <ProductStoreFacility productStoreId="90102" facilityId="WebStoreWarehouse" fromDate="2010-01-01 16:19:47.058"/>
+
+    <WebSite webSiteId="EBAY_STORE2" siteName="eBay Store1" standardContentPrefix="http://demo.ofbiz.org" productStoreId="90102"/>
+    <EbayConfig productStoreId="90102" devId="63655096-de90-4e82-bae4-67566f15bf53" appId="Company0-9f43-4ad4-96f7-19753fbc4e8d" certId="57a28c38-d491-4236-b702-a87e1d10e9a2" compatibilityLevel="643" siteId="0" xmlGatewayUri="https://api.sandbox.ebay.com/ws/api.dll"  apiServerUrl="https://api.sandbox.ebay.com/wsapi"  webSiteId="EBAY_STORE2">
+        <token><![CDATA[AgAAAA**AQAAAA**aAAAAA**xaa5Sw**nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6wFk4CoAJGCqA6dj6x9nY+seQ**QkwBAA**AAMAAA**Gw+sbEXV/KlY0mtzVtkoyvyI/cqJTPLFljiknR9nqxJIB+lxOif0atqUMsOFqTz8Kvqc7F3Ri7JK5jPOaNyxW0+MKeKMoOcWTUTav4kmvTdeqdVLUi6kAtttD6uK/kRN1CyBqe3e9xd7GLLPedOyrtoB0j7mS1sMyu2uPCyeY/QROIxR8ljRSjmcGUco1STOmZ0bqlEudZ+FBKjLxigbnY15I2m09lEOMfmCIIs02im2wp+EPcin72wMMo+RP++Dfl/pL1tYntCEimHJilAtJsAarSUTyXbOwEqG47/jX2u+XXXjF3xlcAwP/i/P4G+qf4NbWOlZY2BrNuOZJw4PRYPMuBgfcAUnHnS7aw/eXlJ0FCCJVgSIwJdTXbQCI5SjluFWGHvC7zsCgqV0AzT6VozlY//2wJTX4RL/b5+O04DkVUtce0/bhkzXPssEOUaVKka97+89zhwuGPjTqBO8+HnAxHVMrKZPcxn2brU4zIi4K7D94zPTfOQfYfRuPmvpsTojmBgLqYABXAOStKKGzT+4EJ0m6qPVV7/frzwTmNj28+SfJOy1LgnvRKMu6+tv6ZBxGbK4aAjot/MV+8arhYEuq0U2x/laCJhfuYAKGW+AZHCDVEhEMGN6VOgHe6X0qymiQKwZaWM3VztThnczYp9GFmiEwlJqtRJvHxVdyVrvWaUxgF4eIQzHAaVjLmXT/3szBapbuO52Q7z/wdjez1rLraqqKDXJsJxuwLIUNuXGkLOgkIYUNTFGcix0u0yJ]]></token>
+        <customXml><![CDATA[<custom-xml><Currency>USD</Currency><UseTaxTable>false</UseTaxTable><DispatchTimeMax>3</DispatchTimeMax><ReturnPolicy><ReturnsAcceptedOption>ReturnsNotAccepted</ReturnsAcceptedOption></ReturnPolicy><ShippingDetails><ShippingType>Flat</ShippingType><ShippingServiceOptions><ShippingService>UPS2ndDay</ShippingService><ShippingServicePriority>1</ShippingServicePriority><ShippingServiceCost>5</ShippingServiceCost><ShippingServiceAdditionalCost>2</ShippingServiceAdditionalCost><ShippingSurcharge>1</ShippingSurcharge></ShippingServiceOptions></ShippingDetails></custom-xml>]]></customXml>
+    </EbayConfig>
+    
+    <!-- Automatic Preferences -->
+    <DataResource dataResourceId="EBAY_WIN_BUYER_NOTI2" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FTL"/>
+    <ElectronicText dataResourceId="EBAY_WIN_BUYER_NOTI2">
+        <textData><![CDATA[
+            <span style="color: rgb(255, 51, 0);">
+                Demo : Automatically send a Winning Buyer Notification email to your winning buyer(s) after item has sold.
+            </span>]]>
+        </textData>
+    </ElectronicText>
+    <Content contentId="EBAY_WIN_BUYER_NOTI2" contentTypeId="DOCUMENT" dataResourceId="EBAY_WIN_BUYER_NOTI2" statusId="CTNT_IN_PROGRESS"/>
+    <ContentRole contentId="EBAY_WIN_BUYER_NOTI2" partyId="DemoEbayAccount2" roleTypeId="OWNER" fromDate="2010-01-01 00:00:00.000"/>
+
+    <DataResource dataResourceId="EBAY_PAY_RECIEVED2" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FTL"/>
+    <ElectronicText dataResourceId="EBAY_PAY_RECIEVED2">
+        <textData><![CDATA[
+            <span style="color: rgb(255, 51, 0);">
+                Demo : Automatically send Payment Received email when payment has been received.
+            </span>]]>
+        </textData>
+    </ElectronicText>
+    <Content contentId="EBAY_PAY_RECIEVED2" contentTypeId="DOCUMENT" dataResourceId="EBAY_PAY_RECIEVED2" statusId="CTNT_IN_PROGRESS"/>
+    <ContentRole contentId="EBAY_PAY_RECIEVED2" partyId="DemoEbayAccount2" roleTypeId="OWNER" fromDate="2010-01-01 00:00:00.000"/>
+
+    <DataResource dataResourceId="EBAY_FEEBACK_REMIN2" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FTL"/>
+    <ElectronicText dataResourceId="EBAY_FEEBACK_REMIN2">
+        <textData><![CDATA[
+            <span style="color: rgb(255, 51, 0);">
+                Demo : Automatically send a Feedback Reminder email if feedback has not been received. Please choose how many days after shipping you want this email sent.
+            </span>]]>
+        </textData>
+    </ElectronicText>
+    <Content contentId="EBAY_FEEBACK_REMIN2" contentTypeId="DOCUMENT" dataResourceId="EBAY_FEEBACK_REMIN2" statusId="CTNT_IN_PROGRESS"/>
+    <ContentRole contentId="EBAY_FEEBACK_REMIN2" partyId="DemoEbayAccount2" roleTypeId="OWNER" fromDate="2010-01-01 00:00:00.000"/>
+
+    <DataResource dataResourceId="EBAY_ITEM_DISPATCH2" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FTL"/>
+    <ElectronicText dataResourceId="EBAY_ITEM_DISPATCH2">
+        <textData><![CDATA[
+            <span style="color: rgb(255, 51, 0);">
+                Demo : Automatic send item dispatched notification email when user mark sold listing as dispatched.
+            </span>]]>
+        </textData>
+    </ElectronicText>
+    <Content contentId="EBAY_ITEM_DISPATCH2" contentTypeId="DOCUMENT" dataResourceId="EBAY_ITEM_DISPATCH2" statusId="CTNT_IN_PROGRESS"/>
+    <ContentRole contentId="EBAY_ITEM_DISPATCH2" partyId="DemoEbayAccount2" roleTypeId="OWNER" fromDate="2010-01-01 00:00:00.000"/>
 
+    <ProductStoreEmailSetting productStoreId="90102" emailType="EBAY_WIN_BUYER_NOTI" bccAddress="[hidden email]" bodyScreenLocation="component://ebaystore/widget/EbayEmailScreens.xml#WinnigBuyerNotification" fromAddress="[hidden email]" subject="OFBiz Demo - Winnig Buyer Notification #${buyerUserId}" xslfoAttachScreenLocation=""/>
+    <ProductStoreEmailSetting productStoreId="90102" emailType="EBAY_PAY_RECIEVED" bccAddress="[hidden email]" bodyScreenLocation="component://ebaystore/widget/EbayEmailScreens.xml#PaymentRecieved" fromAddress="[hidden email]" subject="OFBiz Demo - PaymentRecieved #${buyerUserId}" xslfoAttachScreenLocation=""/>
+    <ProductStoreEmailSetting productStoreId="90102" emailType="EBAY_FEEBACK_REMIN" bccAddress="[hidden email]" bodyScreenLocation="component://ebaystore/widget/EbayEmailScreens.xml#FeedbackReminder" fromAddress="[hidden email]" subject="OFBiz Demo - Feedback Reminder #${buyerUserId}" xslfoAttachScreenLocation=""/>
+    <ProductStoreEmailSetting productStoreId="90102" emailType="EBAY_ITEM_DISPATCH" bccAddress="[hidden email]" bodyScreenLocation="component://ebaystore/widget/EbayEmailScreens.xml#EbayEmailTemplate" fromAddress="[hidden email]" subject="OFBiz Demo - Item Dispatched Notification #${buyerUserId}" xslfoAttachScreenLocation=""/>
 </entity-engine-xml>

Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/data/EbayStorePortletData.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/data/EbayStorePortletData.xml?rev=960512&r1=960511&r2=960512&view=diff
==============================================================================
--- ofbiz/branches/jquery/specialpurpose/ebaystore/data/EbayStorePortletData.xml (original)
+++ ofbiz/branches/jquery/specialpurpose/ebaystore/data/EbayStorePortletData.xml Mon Jul  5 10:07:56 2010
@@ -23,7 +23,7 @@
         screenName="EbayPersonalInformation"
         screenLocation="component://ebaystore/widget/EbayAccountScreens.xml"
         description="Ebay Personan Information"/>
-    <PortletPortletCategory portalPortletId="EbayPersonalInfo" portletCategoryId="PROFILE"/>
+    <PortletPortletCategory portalPortletId="EbayPersonalInfo" portletCategoryId="PARTY_PROFILE"/>
 
     <PortalPage portalPageId="EbayAccount" sequenceNum="0" portalPageName="Ebay Account Portal Page" description="Ebay Account page using flexible Portal technology" ownerUserLoginId="_NA_"/>
     <PortalPageColumn portalPageId="EbayAccount" columnSeqId="00001" columnWidthPercentage="50"/>

Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/servicedef/services.xml?rev=960512&r1=960511&r2=960512&view=diff
==============================================================================
--- ofbiz/branches/jquery/specialpurpose/ebaystore/servicedef/services.xml (original)
+++ ofbiz/branches/jquery/specialpurpose/ebaystore/servicedef/services.xml Mon Jul  5 10:07:56 2010
@@ -441,4 +441,45 @@ under the License.
         <attribute name="functionName" mode="IN" type="String" optional="false"/>
         <attribute name="logMessage" mode="IN" type="String" optional="false"/>
     </service>
+    <service name="getMyeBaySelling" engine="java" transaction-timeout="36000"
+        location="org.ofbiz.ebaystore.EbayStore" invoke="getMyeBaySelling" auth="true">
+        <attribute name="productStoreId" mode="IN" type="String" optional="false"/>
+        <attribute name="entriesPerPage" mode="IN" type="String" optional="true"/>
+        <attribute name="pageNumber" mode="IN" type="String" optional="true"/>
+        <attribute name="listingType" mode="IN" type="String" optional="true"/>
+        <attribute name="activeItems" mode="OUT" type="List" optional="true"/>
+        <attribute name="soldItems" mode="OUT" type="List" optional="true"/>
+        <attribute name="unsoldItems" mode="OUT" type="List" optional="true"/>
+        <attribute name="scheduledItems" mode="OUT" type="List" optional="true"/>
+        <attribute name="activeSize" mode="OUT" type="Integer" optional="true"/>
+        <attribute name="soldSize" mode="OUT" type="Integer" optional="true"/>
+        <attribute name="unsoldeSize" mode="OUT" type="Integer" optional="true"/>
+        <attribute name="scheduledSize" mode="OUT" type="Integer" optional="true"/>
+    </service>
+    <service name="getEbayStoreProductItem" engine="java" transaction-timeout="3600"
+        location="org.ofbiz.ebaystore.EbayStore" invoke="getEbayStoreProductItem" auth="true">
+        <description>Get item data (title, description, price information, and so on) for the specified item ID</description>
+        <attribute name="productStoreId" mode="IN" type="String" optional="false"/>
+        <attribute name="itemId" mode="IN" type="String" optional="false"/>
+        <attribute name="listingType" mode="OUT" type="String" optional="true"/>
+        <attribute name="title" mode="OUT" type="String" optional="true"/>
+        <attribute name="description" mode="OUT" type="String" optional="true"/>
+        <attribute name="price" mode="OUT" type="String" optional="true"/>
+        <attribute name="currencyId" mode="OUT" type="String" optional="true"/>
+        <attribute name="pictureURL" mode="OUT" type="String" optional="true"/>
+    </service>
+    <service name="reviseEbayStoreProductItem" engine="java" transaction-timeout="3600"
+        location="org.ofbiz.ebaystore.EbayStore" invoke="reviseEbayStoreProductItem" auth="true">
+        <description>Change the properties of a currently active listing</description>
+        <attribute name="productStoreId" mode="IN" type="String" optional="false"/>
+        <attribute name="itemId" mode="IN" type="String" optional="false"/>
+        <attribute name="listingType" mode="IN" type="String" optional="true"/>
+        <attribute name="title" mode="IN" type="String" optional="true"/>
+        <attribute name="description" mode="IN" type="String" allow-html="safe"/>
+        <attribute name="price" mode="IN" type="String" optional="true"/>
+        <attribute name="currencyId" mode="IN" type="String" optional="true"/>
+        <attribute mode="IN" name="imageData" optional="true" type="java.nio.ByteBuffer"/>
+        <attribute mode="IN" name="_imageData_contentType" optional="true" type="String"/>
+        <attribute mode="IN" name="_imageData_fileName" optional="true" type="String"/>
+    </service>
 </services>
\ No newline at end of file