svn commit: r1173274 [10/13] - in /ofbiz/branches/jackrabbit20100709: ./ applications/accounting/config/ applications/accounting/entitydef/ applications/accounting/script/org/ofbiz/accounting/invoice/ applications/accounting/script/org/ofbiz/accounting...

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

svn commit: r1173274 [10/13] - in /ofbiz/branches/jackrabbit20100709: ./ applications/accounting/config/ applications/accounting/entitydef/ applications/accounting/script/org/ofbiz/accounting/invoice/ applications/accounting/script/org/ofbiz/accounting...

sascharodekamp
Modified: ofbiz/branches/jackrabbit20100709/framework/minilang/src/org/ofbiz/minilang/method/callops/SetServiceFields.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/minilang/src/org/ofbiz/minilang/method/callops/SetServiceFields.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/minilang/src/org/ofbiz/minilang/method/callops/SetServiceFields.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/minilang/src/org/ofbiz/minilang/method/callops/SetServiceFields.java Tue Sep 20 17:46:13 2011
@@ -25,16 +25,12 @@ import javolution.util.FastList;
 import javolution.util.FastMap;
 
 import org.ofbiz.base.util.Debug;
-import org.ofbiz.base.util.GeneralException;
-import org.ofbiz.base.util.ObjectType;
-import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.minilang.SimpleMethod;
 import org.ofbiz.minilang.method.ContextAccessor;
 import org.ofbiz.minilang.method.MethodContext;
 import org.ofbiz.minilang.method.MethodOperation;
 import org.ofbiz.service.GenericServiceException;
 import org.ofbiz.service.LocalDispatcher;
-import org.ofbiz.service.ModelParam;
 import org.ofbiz.service.ModelService;
 import org.w3c.dom.Element;
 
@@ -99,25 +95,7 @@ public class SetServiceFields extends Me
             methodContext.setErrorReturn(errMsg, simpleMethod);
             return false;
         }
-        for (ModelParam modelParam: modelService.getInModelParamList()) {
-            if (fromMap.containsKey(modelParam.name)) {
-                Object value = fromMap.get(modelParam.name);
-
-                if (UtilValidate.isNotEmpty(modelParam.type)) {
-                    try {
-                        value = ObjectType.simpleTypeConvert(value, modelParam.type, null, methodContext.getTimeZone(), methodContext.getLocale(), true);
-                    } catch (GeneralException e) {
-                        String errMsg = "Could not convert field value for the parameter/attribute: [" + modelParam.name + "] on the [" + serviceName + "] service to the [" + modelParam.type + "] type for the value [" + value + "]: " + e.toString();
-                        Debug.logError(e, errMsg, module);
-                        // add the message to the list and set the value to null - tried and failed, just leave it out
-                        messages.add(errMsg);
-                        value = null;
-                    }
-                }
-
-                toMap.put(modelParam.name, value);
-            }
-        }
+        toMap.putAll(modelService.makeValid(fromMap, "IN", true, messages, methodContext.getTimeZone(), methodContext.getLocale()));
 
         return true;
     }

Modified: ofbiz/branches/jackrabbit20100709/framework/minilang/src/org/ofbiz/minilang/method/envops/SetOperation.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/minilang/src/org/ofbiz/minilang/method/envops/SetOperation.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/minilang/src/org/ofbiz/minilang/method/envops/SetOperation.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/minilang/src/org/ofbiz/minilang/method/envops/SetOperation.java Tue Sep 20 17:46:13 2011
@@ -21,8 +21,10 @@ package org.ofbiz.minilang.method.envops
 import javolution.util.FastList;
 import javolution.util.FastMap;
 
+import org.codehaus.groovy.runtime.InvokerHelper;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.GeneralException;
+import org.ofbiz.base.util.GroovyUtil;
 import org.ofbiz.base.util.ObjectType;
 import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.base.util.string.FlexibleStringExpander;
@@ -54,11 +56,16 @@ public class SetOperation extends Method
     protected String type;
     protected boolean setIfNull; // default to false
     protected boolean setIfEmpty; // default to true
+    protected Class<?> parsedGroovyScript = null;
 
     public SetOperation(Element element, SimpleMethod simpleMethod) {
         super(element, simpleMethod);
         this.field = new ContextAccessor<Object>(element.getAttribute("field"));
-        this.fromField = new ContextAccessor<Object>(element.getAttribute("from-field"));
+        String fromFieldStr = element.getAttribute("from-field");
+        if (fromFieldStr != null && fromFieldStr.startsWith("groovy:")) {
+            this.parsedGroovyScript = GroovyUtil.parseClass(fromFieldStr.replace("groovy:", ""));
+        }
+        this.fromField = new ContextAccessor<Object>(fromFieldStr);
         this.valueExdr = FlexibleStringExpander.getInstance(element.getAttribute("value"));
         this.defaultExdr = FlexibleStringExpander.getInstance(element.getAttribute("default-value"));
         this.type = element.getAttribute("type");
@@ -75,7 +82,9 @@ public class SetOperation extends Method
     @Override
     public boolean exec(MethodContext methodContext) {
         Object newValue = null;
-        if (!this.fromField.isEmpty()) {
+        if (this.parsedGroovyScript != null) {
+            newValue = InvokerHelper.createScript(this.parsedGroovyScript, GroovyUtil.getBinding(methodContext.getEnvMap())).run();
+        } else if (!this.fromField.isEmpty()) {
             newValue = this.fromField.get(methodContext);
             if (Debug.verboseOn()) Debug.logVerbose("In screen getting value for field from [" + this.fromField.toString() + "]: " + newValue, module);
         } else if (!this.valueExdr.isEmpty()) {

Modified: ofbiz/branches/jackrabbit20100709/framework/resources/templates/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/resources/templates/CommonScreens.xml?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/resources/templates/CommonScreens.xml (original)
+++ ofbiz/branches/jackrabbit20100709/framework/resources/templates/CommonScreens.xml Tue Sep 20 17:46:13 2011
@@ -17,7 +17,7 @@
                 <set field="applicationTitle" value="${uiLabelMap.@component-resource-name@Application}" global="true"/>
             </actions>
             <widgets>
-                <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/>
+                <include-screen name="ApplicationDecorator" location="component://commonext/widget/CommonScreens.xml"/>
             </widgets>
         </section>
     </screen>

Modified: ofbiz/branches/jackrabbit20100709/framework/resources/templates/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/resources/templates/services.xml?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/resources/templates/services.xml (original)
+++ ofbiz/branches/jackrabbit20100709/framework/resources/templates/services.xml Tue Sep 20 17:46:13 2011
@@ -5,4 +5,10 @@
     <vendor></vendor>
     <version>1.0</version>
 
+    <service name="noSyntaxError" engine="interface">
+        <description>
+            Dummy service to prevent empty files and syntax error - Remove when the 1st real service will be added here
+        </description>
+    </service>
+    
 </services>
\ No newline at end of file

Modified: ofbiz/branches/jackrabbit20100709/framework/resources/templates/web.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/resources/templates/web.xml?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/resources/templates/web.xml (original)
+++ ofbiz/branches/jackrabbit20100709/framework/resources/templates/web.xml Tue Sep 20 17:46:13 2011
@@ -3,11 +3,11 @@
     <display-name>Open For Business - @component-resource-name@ Component</display-name>
     <description>@component-resource-name@ Component of the Open For Business Project</description>
 
-    <context-param>
+    <!-- context-param>
         <param-name>webSiteId</param-name>
         <param-value>@component-name@Site</param-value>
         <description>A unique ID used to look up the WebSite entity</description>
-    </context-param>
+    </context-param-->
     <context-param>
         <param-name>localDispatcherName</param-name><param-value>@component-name@</param-value>
         <description>A unique name used to identify/recognize the local dispatcher for the Service Engine</description>
@@ -21,11 +21,13 @@
         <param-value>component://@component-name@/widget/CommonScreens.xml</param-value>
         <description>The location of the main-decorator screen to use for this webapp; referred to as a context variable in screen def XML files.</description>
     </context-param>
+    <!--
     <context-param>
         <param-name>widgetVerbose</param-name>
         <param-value>false</param-value>
         <description>Enable widget boundary comments. See org.ofbiz.widget.ModelWidget.widgetBoundaryCommentsEnabled().</description>
     </context-param>
+    -->
     <context-param>
         <param-name>compressHTML</param-name>
         <param-value>false</param-value>

Propchange: ofbiz/branches/jackrabbit20100709/framework/security/data/PasswordSecurityData.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Sep 20 17:46:13 2011
@@ -2,4 +2,4 @@
 /ofbiz/branches/dojo1.4/applications/securityext/data/PasswordSecurityData.xml:951708-952957
 /ofbiz/branches/jquery/applications/securityext/data/PasswordSecurityData.xml:952958-1044489
 /ofbiz/branches/multitenant20100310/applications/securityext/data/PasswordSecurityData.xml:921280-927264
-/ofbiz/trunk/framework/security/data/PasswordSecurityData.xml:962442-1156267
+/ofbiz/trunk/framework/security/data/PasswordSecurityData.xml:962442-1173263

Modified: ofbiz/branches/jackrabbit20100709/framework/service/src/org/ofbiz/service/mail/MimeMessageWrapper.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/service/src/org/ofbiz/service/mail/MimeMessageWrapper.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/service/src/org/ofbiz/service/mail/MimeMessageWrapper.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/service/src/org/ofbiz/service/mail/MimeMessageWrapper.java Tue Sep 20 17:46:13 2011
@@ -255,14 +255,14 @@ public class MimeMessageWrapper implemen
                 if (subPartCount > 0) {
                     for (int si = 0; si < subPartCount; si++) {
                         String sidx = idx + "." + Integer.toString(si);
-                        if (getPartDisposition(sidx) != null && (getPartDisposition(sidx).equals(Part.ATTACHMENT) ||
-                                getPartDisposition(sidx).equals(Part.INLINE))) {
+                        if (getPartDisposition(sidx) != null && (getPartDisposition(sidx).equalsIgnoreCase(Part.ATTACHMENT) ||
+                                getPartDisposition(sidx).equalsIgnoreCase(Part.INLINE))) {
                             attachments.add(sidx);
                         }
                     }
                 } else {
-                    if (getPartDisposition(idx) != null && (getPartDisposition(idx).equals(Part.ATTACHMENT) ||
-                            getPartDisposition(idx).equals(Part.INLINE))) {
+                    if (getPartDisposition(idx) != null && (getPartDisposition(idx).equalsIgnoreCase(Part.ATTACHMENT) ||
+                            getPartDisposition(idx).equalsIgnoreCase(Part.INLINE))) {
                         attachments.add(idx);
                     }
                 }

Modified: ofbiz/branches/jackrabbit20100709/framework/sql/src/org/ofbiz/sql/SQLInsert.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/sql/src/org/ofbiz/sql/SQLInsert.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/sql/src/org/ofbiz/sql/SQLInsert.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/sql/src/org/ofbiz/sql/SQLInsert.java Tue Sep 20 17:46:13 2011
@@ -22,6 +22,7 @@ import java.util.Iterator;
 import java.util.List;
 
 import org.ofbiz.base.util.StringUtil;
+import org.ofbiz.base.util.UtilValidate;
 
 public final class SQLInsert extends SQLStatement<SQLInsert> {
     private final TableName tableName;
@@ -64,7 +65,7 @@ public final class SQLInsert extends SQL
     public StringBuilder appendTo(StringBuilder sb) {
         sb.append("INSERT INTO ");
         tableName.appendTo(sb);
-        if (columns != null && !columns.isEmpty()) {
+        if (UtilValidate.isNotEmpty(columns)) {
             sb.append(" (");
             StringUtil.append(sb, columns, null, null, ", ");
             sb.append(')');

Modified: ofbiz/branches/jackrabbit20100709/framework/start/src/org/ofbiz/base/start/Start.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/start/src/org/ofbiz/base/start/Start.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/start/src/org/ofbiz/base/start/Start.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/start/src/org/ofbiz/base/start/Start.java Tue Sep 20 17:46:13 2011
@@ -152,10 +152,20 @@ public class Start {
     public void init(String[] args, boolean fullInit) throws IOException {
         String globalSystemPropsFileName = System.getProperty("ofbiz.system.props");
         if (globalSystemPropsFileName != null) {
+            FileInputStream stream = null;
             try {
-                System.getProperties().load(new FileInputStream(globalSystemPropsFileName));
+                stream = new FileInputStream(globalSystemPropsFileName);
+                System.getProperties().load(stream);
             } catch (IOException e) {
                 throw (IOException) new IOException("Couldn't load global system props").initCause(e);
+            } finally {
+                if (stream != null){
+                    try {
+                        stream.close();
+                    } catch (IOException e) {
+                        throw new IOException(e);
+                    }
+                }
             }
         }
         this.config = Config.getInstance(args);

Modified: ofbiz/branches/jackrabbit20100709/framework/testtools/src/org/ofbiz/testtools/SimpleMethodTest.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/testtools/src/org/ofbiz/testtools/SimpleMethodTest.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/testtools/src/org/ofbiz/testtools/SimpleMethodTest.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/testtools/src/org/ofbiz/testtools/SimpleMethodTest.java Tue Sep 20 17:46:13 2011
@@ -30,8 +30,16 @@ import org.ofbiz.base.util.UtilMisc;
 import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.minilang.MiniLangException;
 import org.ofbiz.minilang.SimpleMethod;
+import org.ofbiz.security.Security;
+import org.ofbiz.security.SecurityConfigurationException;
+import org.ofbiz.security.SecurityFactory;
 import org.ofbiz.service.ModelService;
 import org.ofbiz.service.testtools.OFBizTestCase;
+
+import org.springframework.mock.web.MockHttpServletRequest;
+import org.springframework.mock.web.MockHttpServletResponse;
+import org.springframework.mock.web.MockServletContext;
+
 import org.w3c.dom.Element;
 
 public class SimpleMethodTest extends OFBizTestCase {
@@ -40,6 +48,9 @@ public class SimpleMethodTest extends OF
 
     protected String methodLocation;
     protected String methodName;
+    
+    public static MockHttpServletRequest request = new MockHttpServletRequest();
+    public static MockHttpServletResponse response = new MockHttpServletResponse();
 
     /**
      * Tests of Simple Method
@@ -64,11 +75,17 @@ public class SimpleMethodTest extends OF
     @Override
     public void run(TestResult result) {
         result.startTest(this);
-
+        
         try {
-
+            // define request
+            Security security = SecurityFactory.getInstance(delegator);
+            MockServletContext servletContext = new MockServletContext();
+            request.setAttribute("security", security);
+            request.setAttribute("servletContext", servletContext);
+            request.setAttribute("delegator", delegator);
+            request.setAttribute("dispatcher", dispatcher);
             Map<String, Object> serviceResult = SimpleMethod.runSimpleService(methodLocation, methodName, dispatcher.getDispatchContext(),
-                    UtilMisc.toMap("test", this, "testResult", result, "locale", Locale.getDefault()));
+                    UtilMisc.toMap("test", this, "testResult", result, "locale", Locale.getDefault(), "request", request, "response", response));
 
             // do something with the errorMessage
             String errorMessage = (String) serviceResult.get(ModelService.ERROR_MESSAGE);
@@ -94,6 +111,8 @@ public class SimpleMethodTest extends OF
 
         } catch (MiniLangException e) {
             result.addError(this, e);
+        } catch (SecurityConfigurationException e) {
+            result.addError(this, e);
         }
 
         result.endTest(this);

Modified: ofbiz/branches/jackrabbit20100709/framework/testtools/src/org/ofbiz/testtools/seleniumxml/RemoteRequest.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/testtools/src/org/ofbiz/testtools/seleniumxml/RemoteRequest.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/testtools/src/org/ofbiz/testtools/seleniumxml/RemoteRequest.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/testtools/src/org/ofbiz/testtools/seleniumxml/RemoteRequest.java Tue Sep 20 17:46:13 2011
@@ -58,6 +58,8 @@ import org.apache.http.params.HttpProtoc
 import org.apache.http.protocol.BasicHttpContext;
 import org.jdom.Element;
 
+import org.ofbiz.base.util.UtilValidate;
+
 
 public class RemoteRequest {
 
@@ -114,7 +116,7 @@ public class RemoteRequest {
     public RemoteRequest(SeleniumXml parent, List<Element> children, List<Element> loginAs, String requestUrl, String hostString, String responseHandlerMode) {
 
         this(parent, children, requestUrl, hostString, responseHandlerMode);
-        if(loginAs != null && !loginAs.isEmpty()) {
+        if (UtilValidate.isNotEmpty(loginAs)) {
             Element elem = loginAs.get(0);
 
             this.loginAsUserParam = elem.getAttributeValue("username-param");

Modified: ofbiz/branches/jackrabbit20100709/framework/testtools/webapp/testtools/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/testtools/webapp/testtools/WEB-INF/web.xml?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/testtools/webapp/testtools/WEB-INF/web.xml (original)
+++ ofbiz/branches/jackrabbit20100709/framework/testtools/webapp/testtools/WEB-INF/web.xml Tue Sep 20 17:46:13 2011
@@ -24,11 +24,6 @@
     <description>Example Application of the Open For Business Project</description>
     
     <context-param>
-        <param-name>webSiteId</param-name>
-        <param-value>TESTTOOLS</param-value>
-        <description>A unique ID used to look up the WebSite entity</description>
-    </context-param>
-    <context-param>
         <param-name>localDispatcherName</param-name><param-value>testtools</param-value>
         <description>A unique name used to identify/recognize the local dispatcher for the Service Engine</description>
     </context-param>

Modified: ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java Tue Sep 20 17:46:13 2011
@@ -389,39 +389,8 @@ public class LoginWorker {
                 setupNewDelegatorEtc = true;
             }
         }
-        
-        String requirePasswordChange = request.getParameter("requirePasswordChange");
-        if ("Y".equals(requirePasswordChange)) {
-            Map<String, Object> inMap = UtilMisc.<String, Object>toMap("login.username", username, "login.password", password, "locale", UtilHttp.getLocale(request));
-            inMap.put("userLoginId", username);
-            inMap.put("currentPassword", password);
-            inMap.put("newPassword", request.getParameter("newPassword"));
-            inMap.put("newPasswordVerify", request.getParameter("newPasswordVerify"));
-            Map<String, Object> result = null;
-            try {
-                result = dispatcher.runSync("updatePassword", inMap);
-            } catch (GenericServiceException e) {
-                Debug.logError(e, "Error calling updatePassword service", module);
-                Map<String, String> messageMap = UtilMisc.toMap("errorMessage", e.getMessage());
-                String errMsg = UtilProperties.getMessage(resourceWebapp, "loginevents.following_error_occurred_during_login", messageMap, UtilHttp.getLocale(request));
-                request.setAttribute("_ERROR_MESSAGE_", errMsg);
-                return "error";
-            }
-            if (ServiceUtil.isError(result)) {
-                String errorMessage = (String) result.get(ModelService.ERROR_MESSAGE);
-                if (UtilValidate.isNotEmpty(errorMessage)) {
-                    Map<String, String> messageMap = UtilMisc.toMap("errorMessage", errorMessage);
-                    String errMsg = UtilProperties.getMessage(resourceWebapp, "loginevents.following_error_occurred_during_login", messageMap, UtilHttp.getLocale(request));
-                    request.setAttribute("_ERROR_MESSAGE_", errMsg);
-                }
-                request.setAttribute("_ERROR_MESSAGE_LIST_", result.get(ModelService.ERROR_MESSAGE_LIST));
-                return "error";
-            } else {
-                password = request.getParameter("newPassword");
-            }
-        }
 
-        Map<String, Object> result = null;
+        Map<String, Object> result = null;
         try {
             // get the visit id to pass to the userLogin for history
             String visitId = VisitHandler.getVisitId(session);
@@ -435,13 +404,53 @@ public class LoginWorker {
         }
 
         if (ModelService.RESPOND_SUCCESS.equals(result.get(ModelService.RESPONSE_MESSAGE))) {
+            GenericValue userLogin = (GenericValue) result.get("userLogin");
+
+            if ("Y".equals(request.getParameter("requirePasswordChange"))) {
+                Map<String, Object> inMap = UtilMisc.<String, Object>toMap("login.username", username, "login.password", password, "locale", UtilHttp.getLocale(request));
+                inMap.put("userLoginId", username);
+                inMap.put("currentPassword", password);
+                inMap.put("newPassword", request.getParameter("newPassword"));
+                inMap.put("newPasswordVerify", request.getParameter("newPasswordVerify"));
+                Map<String, Object> resultPasswordChange = null;
+                try {
+                    resultPasswordChange = dispatcher.runSync("updatePassword", inMap);
+                } catch (GenericServiceException e) {
+                    Debug.logError(e, "Error calling updatePassword service", module);
+                    Map<String, String> messageMap = UtilMisc.toMap("errorMessage", e.getMessage());
+                    String errMsg = UtilProperties.getMessage(resourceWebapp, "loginevents.following_error_occurred_during_login", messageMap, UtilHttp.getLocale(request));
+                    request.setAttribute("_ERROR_MESSAGE_", errMsg);
+                    return "error";
+                }
+                if (ServiceUtil.isError(resultPasswordChange)) {
+                    String errorMessage = (String) resultPasswordChange.get(ModelService.ERROR_MESSAGE);
+                    if (UtilValidate.isNotEmpty(errorMessage)) {
+                        Map<String, String> messageMap = UtilMisc.toMap("errorMessage", errorMessage);
+                        String errMsg = UtilProperties.getMessage(resourceWebapp, "loginevents.following_error_occurred_during_login", messageMap, UtilHttp.getLocale(request));
+                        request.setAttribute("_ERROR_MESSAGE_", errMsg);
+                    }
+                    request.setAttribute("_ERROR_MESSAGE_LIST_", resultPasswordChange.get(ModelService.ERROR_MESSAGE_LIST));
+                    return "error";
+                } else {
+                    try {
+                        userLogin.refresh();
+                    }
+                    catch (GenericEntityException e) {
+                        Debug.logError(e, "Error refreshing userLogin value", module);
+                        Map<String, String> messageMap = UtilMisc.toMap("errorMessage", e.getMessage());
+                        String errMsg = UtilProperties.getMessage(resourceWebapp, "loginevents.following_error_occurred_during_login", messageMap, UtilHttp.getLocale(request));
+                        request.setAttribute("_ERROR_MESSAGE_", errMsg);
+                        return "error";
+                    }
+                }
+            }
+
             if (setupNewDelegatorEtc) {
                 // now set the delegator and dispatcher in a bunch of places just in case they were changed
                 setWebContextObjects(request, response, delegator, dispatcher, true);
             }
             
             // check to see if a password change is required for the user
-            GenericValue userLogin = (GenericValue) result.get("userLogin");
             Map<String, Object> userLoginSession = checkMap(result.get("userLoginSession"), String.class, Object.class);
             if (userLogin != null && "Y".equals(userLogin.getString("requirePasswordChange"))) {
                 return "requirePasswordChange";

Modified: ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java Tue Sep 20 17:46:13 2011
@@ -444,8 +444,9 @@ public class CoreEvents {
         Map<String, String[]> serviceFieldsToSave = checkMap(request.getParameterMap(), String.class, String[].class);
         Map<String, Object> savedFields = FastMap.newInstance();
 
-        for (String key: serviceFieldsToSave.keySet()) {
-            if (null!=serviceFieldsToSave.get(key) && request.getParameter(key).equalsIgnoreCase("on") && !key.equals("_CLEAR_PREVIOUS_PARAMS_")) {
+        for (Map.Entry<String, String[]> entry : serviceFieldsToSave.entrySet()) {
+            String key = entry.getKey();
+            if (entry.getValue() != null && "on".equalsIgnoreCase(request.getParameter(key)) && !"_CLEAR_PREVIOUS_PARAMS_".equals(key)) {
                 String[] servicePath = key.split("\\|\\|");
                 String partialKey = servicePath[servicePath.length-1];
                 savedFields.put(partialKey, getObjectFromServicePath(key ,syncServiceResult));

Modified: ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/webapp/src/org/ofbiz/webapp/event/XmlRpcEventHandler.java Tue Sep 20 17:46:13 2011
@@ -95,16 +95,25 @@ public class XmlRpcEventHandler extends
     public String invoke(Event event, RequestMap requestMap, HttpServletRequest request, HttpServletResponse response) throws EventHandlerException {
         String report = request.getParameter("echo");
         if (report != null) {
+            BufferedReader reader = null;
             StringBuilder buf = new StringBuilder();
             try {
                 // read the inputstream buffer
                 String line;
-                BufferedReader reader = new BufferedReader(new InputStreamReader(request.getInputStream()));
+                reader = new BufferedReader(new InputStreamReader(request.getInputStream()));
                 while ((line = reader.readLine()) != null) {
                     buf.append(line).append("\n");
                 }
             } catch (Exception e) {
                 throw new EventHandlerException(e.getMessage(), e);
+            } finally {
+                if (reader != null) {
+                    try {
+                        reader.close();
+                    } catch (IOException e) {
+                        throw new EventHandlerException(e.getMessage(), e);
+                    }
+                }
             }
             Debug.logInfo("Echo: " + buf.toString(), module);
 

Modified: ofbiz/branches/jackrabbit20100709/framework/webslinger/websites/webslinger/www/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/webslinger/websites/webslinger/www/WEB-INF/web.xml?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/webslinger/websites/webslinger/www/WEB-INF/web.xml (original)
+++ ofbiz/branches/jackrabbit20100709/framework/webslinger/websites/webslinger/www/WEB-INF/web.xml Tue Sep 20 17:46:13 2011
@@ -21,11 +21,6 @@ under the License.
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
  version="2.4">
- <context-param>
-  <description>A unique ID used to look up the WebSite entity</description>
-  <param-name>webSiteId</param-name>
-  <param-value>WEBTOOLS</param-value>
- </context-param>
   <listener><listener-class>org.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
   <listener><listener-class>org.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
   <!-- NOTE: not all app servers support mounting implementations of the HttpSessionActivationListener interface -->

Modified: ofbiz/branches/jackrabbit20100709/framework/webtools/config/WebtoolsUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/webtools/config/WebtoolsUiLabels.xml?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/webtools/config/WebtoolsUiLabels.xml (original)
+++ ofbiz/branches/jackrabbit20100709/framework/webtools/config/WebtoolsUiLabels.xml Tue Sep 20 17:46:13 2011
@@ -19,6 +19,66 @@
     under the License.
 -->
 <resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <property key="EntityImportDeletFile">
+        <value xml:lang="en">Deleting ${fileName}</value>
+        <value xml:lang="it">Stò cancellando il file ${fileName}</value>
+    </property>
+    <property key="EntityImportErrorRetrievingEntityNames">
+        <value xml:lang="en">Error retrieving entity names.</value>
+        <value xml:lang="it">Errore nell'ottenere i nome delle entità.</value>
+    </property>
+    <property key="EntityImportFailedFile">
+        <value xml:lang="en">Failed ${fileName} adding to retry list for next pass</value>
+        <value xml:lang="it">Fallita ${fileName} aggiunta alla lista di riprova al successivo passaggio</value>
+    </property>
+    <property key="EntityImportFailedFileList">
+        <value xml:lang="en">Failed Files:</value>
+        <value xml:lang="it">Lista file che hanno avuto fallimento:</value>
+    </property>
+    <property key="EntityImportFailedNumberFile">
+        <value xml:lang="en">Failed: ${failed} of ${total}</value>
+        <value xml:lang="it">Failed: ${failed} di ${total}</value>
+    </property>
+    <property key="EntityImportNoDataSourceSpecified">
+        <value xml:lang="en">Unable to locate the datasource helper for the group ${groupNameToUse}</value>
+        <value xml:lang="it">Non è possibile localizzare la sorgente dati per il gruppo ${groupNameToUse}</value>
+    </property>
+    <property key="EntityImportNoXmlFileOrTextSpecified">
+        <value xml:lang="en">No entity xml file or text specified</value>
+        <value xml:lang="it">Nessun file xml entità o testo specificato</value>
+    </property>
+    <property key="EntityImportNoXmlFileSpecified">
+        <value xml:lang="en">No filename/URL or complete XML document specified, doing nothing.</value>
+        <value xml:lang="it">Nessun nome file/URL o documento XML completo specificato, nientre verrà fatto.</value>
+    </property>
+    <property key="EntityImportNumberOfEntityToBeProcessed">
+        <value xml:lang="en">Got ${numberRead} entities from ${fileName}</value>
+        <value xml:lang="it">Ottenute ${numberRead} entità da ${fileName}</value>
+    </property>
+    <property key="EntityImportParsingError">
+        <value xml:lang="en">ERROR parsing Entity Xml file: ${errorString}</value>
+        <value xml:lang="it">ERRORE di parsing file entità XML: ${errorString}</value>
+    </property>
+    <property key="EntityImportPassedFile">
+        <value xml:lang="en">Pass ${passes} complete</value>
+        <value xml:lang="it">Passati ${passes} completati</value>
+    </property>
+    <property key="EntityImportPathNotFound">
+        <value xml:lang="en">path not found or can't be read</value>
+        <value xml:lang="it">path non trovato o non può essere letto</value>
+    </property>
+    <property key="EntityImportPathNotSpecified">
+        <value xml:lang="en">No path specified, doing nothing.</value>
+        <value xml:lang="it">Nessun path specificato, non verrà fatto niente.</value>
+    </property>
+    <property key="EntityImportRowProcessed">
+        <value xml:lang="en">Got ${numberRead} entities to write to the datasource.</value>
+        <value xml:lang="it">Ottenute ${numberRead} entità da scrivere sulla sorgente dati.</value>
+    </property>
+    <property key="EntityImportSucceededNumberFile">
+        <value xml:lang="en">Succeeded: ${succeeded} of ${total}</value>
+        <value xml:lang="it">Successo: ${succeeded} di ${total}</value>
+    </property>
     <property key="FormFieldTitle_date1">
         <value xml:lang="de">Datum1</value>
         <value xml:lang="en">date1</value>
@@ -108,8 +168,8 @@
         <value xml:lang="zh_TW">整數2</value>
     </property>
     <property key="FormFieldTitle_keepRemoveInfoHours">
-        <value xml:lang="en">Keep Remove Info Hours</value>
         <value xml:lang="de">Info-Stunden beibehalten/entfernen</value>
+        <value xml:lang="en">Keep Remove Info Hours</value>
         <value xml:lang="fr">Maintenir le retrait des heures d'information</value>
         <value xml:lang="it">Mantieni gli orari delle informazioni eliminate</value>
         <value xml:lang="ro">Mentine Orariul  Informatii Sterse </value>
@@ -558,6 +618,10 @@
         <value xml:lang="zh">调整调试级别</value>
         <value xml:lang="zh_TW">調整調試級別</value>
     </property>
+    <property key="WebtoolsAdminPortalPage">
+        <value xml:lang="en">Portal page Admin.</value>
+        <value xml:lang="fr">Admin. Page portail</value>
+    </property>
     <property key="WebtoolsAdministration">
         <value xml:lang="de">Administration</value>
         <value xml:lang="en">Administration</value>
@@ -568,10 +632,6 @@
         <value xml:lang="zh">管理</value>
         <value xml:lang="zh_TW">管理</value>
     </property>
-    <property key="WebtoolsAdminPortalPage">
-        <value xml:lang="en">Portal page Admin.</value>
-        <value xml:lang="fr">Admin. Page portail</value>
-    </property>
     <property key="WebtoolsAll">
         <value xml:lang="de">Alle</value>
         <value xml:lang="en">All</value>
@@ -584,8 +644,8 @@
     </property>
     <property key="WebtoolsArtifactInfo">
         <value xml:lang="de">OFBiz Elemente-Info</value>
-        <value xml:lang="en">Artifact Info</value>
-        <value xml:lang="fr">Info. sur les éléments d'OFBiz</value>
+        <value xml:lang="en">Artifact Info (may take some time to load)</value>
+        <value xml:lang="fr">Information sur les éléments d'OFBiz (cela peut prendre un certain temps à charger)</value>
         <value xml:lang="it">Informazioni sugli artefatti</value>
         <value xml:lang="pt">Info do Artefato</value>
         <value xml:lang="zh">人工程序信息</value>
@@ -1372,66 +1432,6 @@
         <value xml:lang="zh">实体引擎工具</value>
         <value xml:lang="zh_TW">實體引擎工具</value>
     </property>
-    <property key="EntityImportDeletFile">
-        <value xml:lang="en">Deleting ${fileName}</value>
-        <value xml:lang="it">Stò cancellando il file ${fileName}</value>
-    </property>
-    <property key="EntityImportErrorRetrievingEntityNames">
-        <value xml:lang="en">Error retrieving entity names.</value>
-        <value xml:lang="it">Errore nell'ottenere i nome delle entità.</value>
-    </property>
-    <property key="EntityImportFailedNumberFile">
-        <value xml:lang="en">Failed: ${failed} of ${total}</value>
-        <value xml:lang="it">Failed: ${failed} di ${total}</value>
-    </property>
-    <property key="EntityImportFailedFile">
-        <value xml:lang="en">Failed ${fileName} adding to retry list for next pass</value>
-        <value xml:lang="it">Fallita ${fileName} aggiunta alla lista di riprova al successivo passaggio</value>
-    </property>
-    <property key="EntityImportFailedFileList">
-        <value xml:lang="en">Failed Files:</value>
-        <value xml:lang="it">Lista file che hanno avuto fallimento:</value>
-    </property>
-    <property key="EntityImportNoDataSourceSpecified">
-        <value xml:lang="en">Unable to locate the datasource helper for the group ${groupNameToUse}</value>
-        <value xml:lang="it">Non è possibile localizzare la sorgente dati per il gruppo ${groupNameToUse}</value>
-    </property>
-    <property key="EntityImportNoXmlFileOrTextSpecified">
-        <value xml:lang="en">No entity xml file or text specified</value>
-        <value xml:lang="it">Nessun file xml entità o testo specificato</value>
-    </property>
-    <property key="EntityImportNoXmlFileSpecified">
-        <value xml:lang="en">No filename/URL or complete XML document specified, doing nothing.</value>
-        <value xml:lang="it">Nessun nome file/URL o documento XML completo specificato, nientre verrà fatto.</value>
-    </property>
-    <property key="EntityImportNumberOfEntityToBeProcessed">
-        <value xml:lang="en">Got ${numberRead} entities from ${fileName}</value>
-        <value xml:lang="it">Ottenute ${numberRead} entità da ${fileName}</value>
-    </property>
-    <property key="EntityImportParsingError">
-        <value xml:lang="en">ERROR parsing Entity Xml file: ${errorString}</value>
-        <value xml:lang="it">ERRORE di parsing file entità XML: ${errorString}</value>
-    </property>
-    <property key="EntityImportPathNotFound">
-        <value xml:lang="en">path not found or can't be read</value>
-        <value xml:lang="it">path non trovato o non può essere letto</value>
-    </property>
-    <property key="EntityImportPathNotSpecified">
-        <value xml:lang="en">No path specified, doing nothing.</value>
-        <value xml:lang="it">Nessun path specificato, non verrà fatto niente.</value>
-    </property>
-    <property key="EntityImportPassedFile">
-        <value xml:lang="en">Pass ${passes} complete</value>
-        <value xml:lang="it">Passati ${passes} completati</value>
-    </property>
-    <property key="EntityImportRowProcessed">
-        <value xml:lang="en">Got ${numberRead} entities to write to the datasource.</value>
-        <value xml:lang="it">Ottenute ${numberRead} entità da scrivere sulla sorgente dati.</value>
-    </property>
-    <property key="EntityImportSucceededNumberFile">
-        <value xml:lang="en">Succeeded: ${succeeded} of ${total}</value>
-        <value xml:lang="it">Successo: ${succeeded} di ${total}</value>
-    </property>
     <property key="WebtoolsEntityName">
         <value xml:lang="de">Entität</value>
         <value xml:lang="en">Entity Name</value>
@@ -1924,24 +1924,6 @@
         <value xml:lang="zh">通用Java线程</value>
         <value xml:lang="zh_TW">通用Java線程</value>
     </property>
-    <property key="WebtoolsGroup">
-        <value xml:lang="de">Gruppe</value>
-        <value xml:lang="en">Group</value>
-        <value xml:lang="fr">Groupe</value>
-        <value xml:lang="it">Gruppo</value>
-        <value xml:lang="th">กลุ่ม</value>
-        <value xml:lang="zh">组</value>
-        <value xml:lang="zh_TW">組</value>
-    </property>
-    <property key="WebtoolsGroupName">
-        <value xml:lang="de">Gruppenname</value>
-        <value xml:lang="en">Group Name</value>
-        <value xml:lang="fr">Nom de groupe</value>
-        <value xml:lang="it">Nome gruppo</value>
-        <value xml:lang="th">ชื่อกลุ่ม</value>
-        <value xml:lang="zh">组名称</value>
-        <value xml:lang="zh_TW">組名稱</value>
-    </property>
     <property key="WebtoolsGeoCreateNew">
         <value xml:lang="en">Create/Edit Geo</value>
         <value xml:lang="fr">Créer/Modifier une zone géographique</value>
@@ -1949,7 +1931,7 @@
     <property key="WebtoolsGeoEdit">
         <value xml:lang="en">Create/Edit Geo</value>
         <value xml:lang="fr">Créer/Modifier la zone géographique</value>
-    </property>    
+    </property>
     <property key="WebtoolsGeoManagement">
         <value xml:lang="en">Geo Management</value>
         <value xml:lang="fr">Gestion des zones géographiques</value>
@@ -1970,6 +1952,24 @@
         <value xml:lang="en">Select Geos to associate</value>
         <value xml:lang="fr">Sélectionner les zones géographiques à associer</value>
     </property>
+    <property key="WebtoolsGroup">
+        <value xml:lang="de">Gruppe</value>
+        <value xml:lang="en">Group</value>
+        <value xml:lang="fr">Groupe</value>
+        <value xml:lang="it">Gruppo</value>
+        <value xml:lang="th">กลุ่ม</value>
+        <value xml:lang="zh">组</value>
+        <value xml:lang="zh_TW">組</value>
+    </property>
+    <property key="WebtoolsGroupName">
+        <value xml:lang="de">Gruppenname</value>
+        <value xml:lang="en">Group Name</value>
+        <value xml:lang="fr">Nom de groupe</value>
+        <value xml:lang="it">Nome gruppo</value>
+        <value xml:lang="th">ชื่อกลุ่ม</value>
+        <value xml:lang="zh">组名称</value>
+        <value xml:lang="zh_TW">組名稱</value>
+    </property>
     <property key="WebtoolsHits">
         <value xml:lang="de">Besuche</value>
         <value xml:lang="en">Hits</value>
@@ -2088,7 +2088,7 @@
         <value xml:lang="en">Index Name</value>
         <value xml:lang="fr">Nom d'index</value>
         <value xml:lang="it">Nome indice</value>
-        <value xml:lang="pt">Nome do Índice</value>
+        <value xml:lang="pt">Nome do Ã&#141;ndice</value>
         <value xml:lang="th">ชื่อตัววัด</value>
         <value xml:lang="zh">索引名称</value>
         <value xml:lang="zh_TW">索引名稱</value>
@@ -2483,7 +2483,7 @@
         <value xml:lang="de">Um zu beginnen, wählen Sie eine Datei aus; danach werden alle Optionen aktiviert. Sofern kein Button erscheint, setzen Sie den Cursor in ein Feld und validieren Sie mit 'Enter'.</value>
         <value xml:lang="en">For the moment, to begin you need to choose one file, after all options are opened. Without button put the cursor in a field and validate.</value>
         <value xml:lang="fr">Pour le moment, pour commencer vous devez choisir un fichier, ensuite tout est ouvert. Si aucun bouton n'apparaît, postionnez le curseur dans un champ et validez.</value>
-    </property>    
+    </property>
     <property key="WebtoolsLabelManagerUpdate">
         <value xml:lang="de">Label aktualisieren</value>
         <value xml:lang="en">Update Label</value>
@@ -2686,6 +2686,9 @@
         <value xml:lang="zh">维护时间戳?</value>
         <value xml:lang="zh_TW">維護時間戳?</value>
     </property>
+    <property key="WebtoolsMaxInMemory">
+        <value xml:lang="en">Max In Memory</value>
+    </property>
     <property key="WebtoolsMaxMemory">
         <value xml:lang="de">Max. Speicher</value>
         <value xml:lang="en">MAX</value>
@@ -2738,9 +2741,6 @@
         <value xml:lang="zh">最大大小</value>
         <value xml:lang="zh_TW">最大大小</value>
     </property>
-    <property key="WebtoolsMaxInMemory">
-        <value xml:lang="en">Max In Memory</value>
-    </property>
     <property key="WebtoolsMemory">
         <value xml:lang="de">Speicher</value>
         <value xml:lang="en">Memory</value>
@@ -2877,6 +2877,16 @@
         <value xml:lang="zh">没有实体读</value>
         <value xml:lang="zh_TW">沒有實體讀</value>
     </property>
+    <property key="WebtoolsNoEntityRecordsFound">
+        <value xml:lang="de">Für die Entität wurden keine Datensätze gefunden</value>
+        <value xml:lang="en">No Records found for Entity</value>
+        <value xml:lang="fr">Aucun enregistrement trouvé pour l'entité</value>
+        <value xml:lang="it">Nessun records trovato per l'entità</value>
+        <value xml:lang="ro">Nici-un Record gasit pentru Entitatea WebtoolsNoUtilCacheFound=Nici-o instanta de Cache gasita</value>
+        <value xml:lang="th">ไม่พบข้อมูลที่บันทึกสำหรับเอนติตี้</value>
+        <value xml:lang="zh">没有找到实体记录</value>
+        <value xml:lang="zh_TW">沒有找到實體記錄</value>
+    </property>
     <property key="WebtoolsNoFilenameSpecified">
         <value xml:lang="de">Kein Dateiname oder keine Entitätennamen angegeben</value>
         <value xml:lang="en">No filename specified or no entity names specified, doing nothing.</value>
@@ -2896,16 +2906,6 @@
         <value xml:lang="zh">没有定义参数</value>
         <value xml:lang="zh_TW">沒有定義參數</value>
     </property>
-    <property key="WebtoolsNoEntityRecordsFound">
-        <value xml:lang="de">Für die Entität wurden keine Datensätze gefunden</value>
-        <value xml:lang="en">No Records found for Entity</value>
-        <value xml:lang="fr">Aucun enregistrement trouvé pour l'entité</value>
-        <value xml:lang="it">Nessun records trovato per l'entità</value>
-        <value xml:lang="ro">Nici-un Record gasit pentru Entitatea WebtoolsNoUtilCacheFound=Nici-o instanta de Cache gasita</value>
-        <value xml:lang="th">ไม่พบข้อมูลที่บันทึกสำหรับเอนติตี้</value>
-        <value xml:lang="zh">没有找到实体记录</value>
-        <value xml:lang="zh_TW">沒有找到實體記錄</value>
-    </property>
     <property key="WebtoolsNoRunningProcesses">
         <value xml:lang="de">Es laufen keine Prozesse</value>
         <value xml:lang="en">No running processes</value>
@@ -3087,8 +3087,8 @@
     </property>
     <property key="WebtoolsOutToBrowser">
         <value xml:lang="de">ODER Browserausgabe</value>
-        <value xml:lang="en">OR Out to Browser</value>
-        <value xml:lang="fr">OU en dehors vers le navigateur</value>
+        <value xml:lang="en">&lt;U&gt;OR&lt;/U&gt; Out to Browser (FireFox, Safari and Opera: view source. Chrome does not work)</value>
+        <value xml:lang="fr">&lt;U&gt;OU&lt;/U&gt; dans le navigateur (FireFox, Safari  et Opera : voir le source. Chrome ne fontionne pas)</value>
         <value xml:lang="it">O output al browser</value>
         <value xml:lang="pt">Ou devolver para o navegador</value>
         <value xml:lang="th">หรืออกไปสู่ Browser</value>
@@ -4767,5 +4767,5 @@
         <value xml:lang="th">คุณสามารถที่จะสร้าง Entity ได้ ${entityName} โดยการเข้าสู่ค่าที่คุณต้องการและคลิก Create.</value>
         <value xml:lang="zh">创建一个实体 ${entityName} :输入值,然后点击新建.</value>
         <value xml:lang="zh_TW">創建一個實體 ${entityName} :輸入值,然後點擊新建.</value>
-    </property>    
+    </property>
 </resource>

Modified: ofbiz/branches/jackrabbit20100709/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoBase.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoBase.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoBase.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoBase.java Tue Sep 20 17:46:13 2011
@@ -21,42 +21,58 @@ package org.ofbiz.webtools.artifactinfo;
 import java.net.MalformedURLException;
 import java.net.URL;
 
-
-
 /**
  *
  */
 public abstract class ArtifactInfoBase implements Comparable<ArtifactInfoBase> {
+
     protected ArtifactInfoFactory aif;
+    private String fullName = null;
 
     public ArtifactInfoBase(ArtifactInfoFactory aif) {
         this.aif = aif;
     }
 
+    public int compareTo(ArtifactInfoBase that) {
+        if (that == null) {
+            return -1;
+        }
+        return this.toString().compareTo(that.toString());
+    }
+
     @Override
     public boolean equals(Object obj) {
-        if (obj instanceof ArtifactInfoBase) {
-            return this.equals(obj);
-        } else {
+        if (this == obj) {
+            return true;
+        }
+        try {
+            ArtifactInfoBase that = (ArtifactInfoBase) obj;
+            return this.toString().equals(that.toString());
+        } catch (Exception e) {
             return false;
         }
     }
 
-    public int compareTo(ArtifactInfoBase that) {
-        if (that == null) return -1;
-        String thisName = this.getDisplayType() + ":" + this.getDisplayName();
-        String thatName = that.getDisplayType() + ":" + that.getDisplayName();
-        return thisName.compareTo(thatName);
-    }
-
     abstract public String getDisplayName();
+
     abstract public String getDisplayType();
+
+    abstract public URL getLocationURL() throws MalformedURLException;
+
     abstract public String getType();
+
     abstract public String getUniqueId();
-    abstract public URL getLocationURL() throws MalformedURLException;
 
+    @Override
+    public int hashCode() {
+        return toString().hashCode();
+    }
 
-    //public static List<ArtifactInfoBase> sortArtifactInfoSetByDisplayName(Set<ArtifactInfoBase> artifactInfoSet) {
-        //SortedMap<String, ArtifactInfoBase> sortedMap = FastMap.newInstance();
-    //}
+    @Override
+    public String toString() {
+        if (this.fullName == null) {
+            this.fullName = this.getDisplayType().concat(":").concat(this.getDisplayName());
+        }
+        return this.fullName;
+    }
 }

Modified: ofbiz/branches/jackrabbit20100709/framework/webtools/webapp/webtools/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/webtools/webapp/webtools/WEB-INF/web.xml?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/webtools/webapp/webtools/WEB-INF/web.xml (original)
+++ ofbiz/branches/jackrabbit20100709/framework/webtools/webapp/webtools/WEB-INF/web.xml Tue Sep 20 17:46:13 2011
@@ -25,11 +25,6 @@ under the License.
   <description>Common Application Components of the Open For Business Project</description>
 
   <context-param>
-    <param-name>webSiteId</param-name>
-    <param-value>WEBTOOLS</param-value>
-    <description>A unique ID used to look up the WebSite entity</description>
-  </context-param>
-  <context-param>
     <param-name>entityDelegatorName</param-name>
     <param-value>default</param-value>
     <!--<description>The Name of the Entity Delegator to use, defined in entityengine.xml</description>-->

Modified: ofbiz/branches/jackrabbit20100709/framework/webtools/webapp/webtools/entity/xmldsdump.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/webtools/webapp/webtools/entity/xmldsdump.ftl?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/webtools/webapp/webtools/entity/xmldsdump.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/framework/webtools/webapp/webtools/entity/xmldsdump.ftl Tue Sep 20 17:46:13 2011
@@ -82,7 +82,7 @@ under the License.
         </td>
       </tr>
       <tr>
-        <td class="label">${uiLabelMap.WebtoolsOutToBrowser}</td>
+        <td class="label">${StringUtil.wrapString(uiLabelMap.WebtoolsOutToBrowser)}</td>
         <td><input type="checkbox" name="tobrowser"<#if tobrowser?has_content> checked="checked"</#if> /></td>
       </tr>
     </table>

Modified: ofbiz/branches/jackrabbit20100709/framework/widget/config/conditional.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/widget/config/conditional.xml?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/widget/config/conditional.xml (original)
+++ ofbiz/branches/jackrabbit20100709/framework/widget/config/conditional.xml Tue Sep 20 17:46:13 2011
@@ -159,6 +159,7 @@
         <value xml:lang="zh_TW">小于等于</value>
     </property>
     <property key="not_equal">
+        <value xml:lang="de">ungleich</value>
         <value xml:lang="en">Not Equal</value>
         <value xml:lang="fr">Diff.</value>
         <value xml:lang="it">Diverso da</value>

Modified: ofbiz/branches/jackrabbit20100709/framework/widget/config/widget.properties
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/widget/config/widget.properties?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/widget/config/widget.properties (original)
+++ ofbiz/branches/jackrabbit20100709/framework/widget/config/widget.properties Tue Sep 20 17:46:13 2011
@@ -20,8 +20,11 @@
 # Enable HTML whitespace compression; deprecated: use output specific "compress" setting instead; see for example screen.compress
 #compress.HTML=true
 
-# Enable screen widget boundary comments
-# 'false' can be overwritten by a 'widgetVerbose' parameter in the web.xml file see web.xml in the example component how to do this
+# Enable screen widget boundary comments.
+# A setting of true will enable widget boundary comments. The true setting can be
+# overridden in an application's web.xml file or in the screen rendering context.
+# A setting of false will override all other settings and disable all widget
+# boundary comments.
 widget.verbose=true
 
 # Default number of items to be displayed per page in a list form

Modified: ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/ModelWidget.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/ModelWidget.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/ModelWidget.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/ModelWidget.java Tue Sep 20 17:46:13 2011
@@ -34,21 +34,7 @@ public class ModelWidget implements Seri
 
     /**
      * The parameter name used to control widget boundary comments. Currently
-     * set to "widgetVerbose". Set the parameter to "true" to enable widget
-     * boundary comments.<br/><br/>
-     * <code>WEB-INF/web.xml</code> example:<br/><br/>
-     * <code>
-     * &lt;context-param&gt;<br/>
-     * &nbsp;&nbsp;&lt;param-name&gt;widgetVerbose&lt;/param-name&gt;<br/>
-     * &nbsp;&nbsp;&lt;param-value&gt;true&lt;/param-value&gt;<br/>
-     * &lt;/context-param&gt;
-     * </code><br/><br/>
-     * Screen widget example:<br/><br/>
-     * <code>
-     * &lt;actions&gt;<br/>
-     * &nbsp;&nbsp;&lt;set field="parameters.widgetVerbose" value="true" global="true"/&gt;<br/>
-     * &lt;/actions&gt;
-     * </code>
+     * set to "widgetVerbose".
      */
     public static final String enableBoundaryCommentsParam = "widgetVerbose";
     protected String name;
@@ -139,14 +125,18 @@ public class ModelWidget implements Seri
     }
 
     /**
-     * Returns true if widget boundary comments are enabled. Widget boundary comments are
-     * enabled by setting widgetVerbose true in the context Map, or by setting
-     * widget.verbose=true in widget.properties.
+     * Returns <code>true</code> if widget boundary comments are enabled. Widget boundary comments are
+     * enabled by setting <code>widget.verbose=true</code> in the <code>widget.properties</code> file.
+     * The <code>true</code> setting can be overridden in <code>web.xml</code> or in the screen
+     * rendering context. If <code>widget.verbose</code> is set to <code>false</code> in the
+     * <code>widget.properties</code> file, then that setting will override all other settings and
+     * disable all widget boundary comments.
+     *
      * @param context Optional context Map
      */
     public static boolean widgetBoundaryCommentsEnabled(Map<String, ? extends Object> context) {
         boolean result = "true".equals(UtilProperties.getPropertyValue("widget", "widget.verbose"));
-        if (result == false && context != null) {
+        if (result && context != null) {
             String str = (String) context.get(enableBoundaryCommentsParam);
             if (str != null) {
                 result = "true".equals(str);

Modified: ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/cache/WidgetContextCacheKey.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/cache/WidgetContextCacheKey.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/cache/WidgetContextCacheKey.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/cache/WidgetContextCacheKey.java Tue Sep 20 17:46:13 2011
@@ -148,12 +148,13 @@ public class WidgetContextCacheKey {
 
     public static String printMap(Map<String, ? extends Object> map) {
         Map<String, Object> printableMap = FastMap.newInstance();
-        for (String fieldName: map.keySet()) {
+        for (Map.Entry<String, ? extends Object> entry : map.entrySet()) {
+            String fieldName = entry.getKey();
             if (!fieldNamesToSkip.contains(fieldName) &&
                     !fieldName.startsWith("javax.servlet") &&
                     !fieldName.startsWith("org.apache") &&
                     !fieldName.startsWith("_CLIENT_")) {
-                printableMap.put(fieldName, map.get(fieldName));
+                printableMap.put(fieldName, entry.getValue());
             }
         }
         return UtilMisc.printMap(printableMap);

Modified: ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java Tue Sep 20 17:46:13 2011
@@ -1350,6 +1350,10 @@ public class MacroFormRenderer implement
         String containerStyle =  modelForm.getContainerStyle();
         String autocomplete = "";
         String name = modelForm.getCurrentFormName(context);
+        String viewIndexField = modelForm.getMultiPaginateIndexField(context);
+        String viewSizeField = modelForm.getMultiPaginateSizeField(context);
+        int viewIndex = modelForm.getViewIndex(context);
+        int viewSize = modelForm.getViewSize(context);
         boolean useRowSubmit = modelForm.getUseRowSubmit();
         if (!modelForm.getClientAutocompleteFields()) {
             autocomplete = "off";
@@ -1370,6 +1374,14 @@ public class MacroFormRenderer implement
         sr.append(autocomplete);
         sr.append("\" name=\"");
         sr.append(name);
+        sr.append("\" viewIndexField=\"");
+        sr.append(viewIndexField);
+        sr.append("\" viewSizeField=\"");
+        sr.append(viewSizeField);
+        sr.append("\" viewIndex=\"");
+        sr.append(Integer.toString(viewIndex));
+        sr.append("\" viewSize=\"");
+        sr.append(Integer.toString(viewSize));
         sr.append("\" useRowSubmit=");
         sr.append(Boolean.toString(useRowSubmit));
         sr.append(" />");
@@ -2932,16 +2944,18 @@ public class MacroFormRenderer implement
                 if(UtilValidate.isEmpty(ajaxParams)){
                     ajaxParams = "";
                 }
-                for (String key : parameters.keySet()) {
+                for (Map.Entry<String, String> entry : parameters.entrySet()) {
+                    String key = entry.getKey();
+                    String value = entry.getValue();
                     //test if ajax parameters are not already into extraParams, if so do not add it
-                    if(UtilValidate.isNotEmpty(extraParams) && extraParams.contains(parameters.get(key))){
+                    if(UtilValidate.isNotEmpty(extraParams) && extraParams.contains(value)){
                         continue;
                     }
                     if (ajaxParams.length() > 0 && ajaxParams.indexOf(key) < 0) {
                         ajaxParams += "&";
                     }
                     if (ajaxParams.indexOf(key) < 0) {
-                        ajaxParams += key + "=" + parameters.get(key);
+                        ajaxParams += key + "=" + value;
                     }
                 }
             }
@@ -3023,8 +3037,22 @@ public class MacroFormRenderer implement
         String realLinkType = WidgetWorker.determineAutoLinkType(linkType, target, targetType, request);
 
         String encodedDescription = encode(description, modelFormField, context);
+        // get the parameterized pagination index and size fields
+        int paginatorNumber = WidgetWorker.getPaginatorNumber(context);
+        String viewIndexField = modelFormField.modelForm.getMultiPaginateIndexField(context);
+        String viewSizeField = modelFormField.modelForm.getMultiPaginateSizeField(context);
+        int viewIndex = modelFormField.modelForm.getViewIndex(context);
+        int viewSize = modelFormField.modelForm.getViewSize(context);
         
+        if (viewIndexField.equals("viewIndex" + "_" + paginatorNumber)) {
+            viewIndexField = "VIEW_INDEX" + "_" + paginatorNumber;
+        }
+        if (viewSizeField.equals("viewSize" + "_" + paginatorNumber)) {
+            viewSizeField = "VIEW_SIZE" + "_" + paginatorNumber;
+        }
         if ("hidden-form".equals(realLinkType)) {
+            parameterMap.put(viewIndexField, Integer.toString(viewIndex));
+            parameterMap.put(viewSizeField, Integer.toString(viewSize));
             if (modelFormField != null && "multi".equals(modelFormField.getModelForm().getType())) {
                 WidgetWorker.makeHiddenFormLinkAnchor(writer, linkStyle, encodedDescription, confirmation , modelFormField, request, response, context);
 

Modified: ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/form/ModelForm.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/form/ModelForm.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/form/ModelForm.java (original)
+++ ofbiz/branches/jackrabbit20100709/framework/widget/src/org/ofbiz/widget/form/ModelForm.java Tue Sep 20 17:46:13 2011
@@ -2492,7 +2492,7 @@ public class ModelForm extends ModelWidg
     }
 
     public boolean getPaginate(Map<String, Object> context) {
-        if (this.paginate != null && !this.paginate.isEmpty() && UtilValidate.isNotEmpty(this.paginate.expandString(context))) {
+        if (UtilValidate.isNotEmpty(this.paginate) && UtilValidate.isNotEmpty(this.paginate.expandString(context))) {
             return Boolean.valueOf(this.paginate.expandString(context)).booleanValue();
         } else {
             return true;