svn commit: r1355450 [3/4] - in /ofbiz/branches/jackrabbit20120501: ./ applications/accounting/data/ applications/accounting/script/org/ofbiz/accounting/payment/ applications/accounting/src/org/ofbiz/accounting/payment/ applications/accounting/webapp/a...

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

svn commit: r1355450 [3/4] - in /ofbiz/branches/jackrabbit20120501: ./ applications/accounting/data/ applications/accounting/script/org/ofbiz/accounting/payment/ applications/accounting/src/org/ofbiz/accounting/payment/ applications/accounting/webapp/a...

sascharodekamp
Modified: ofbiz/branches/jackrabbit20120501/applications/product/webapp/catalog/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/applications/product/webapp/catalog/WEB-INF/controller.xml?rev=1355450&r1=1355449&r2=1355450&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/applications/product/webapp/catalog/WEB-INF/controller.xml (original)
+++ ofbiz/branches/jackrabbit20120501/applications/product/webapp/catalog/WEB-INF/controller.xml Fri Jun 29 15:44:16 2012
@@ -63,13 +63,6 @@ under the License.
         <response name="success" type="view" value="FastLoadCache"/>
     </request-map>
 
-    <request-map uri="changeDelegator">
-        <security https="true" auth="true"/>
-        <event type="java" path="org.ofbiz.webapp.event.CoreEvents" invoke="changeDelegator"/>
-        <response name="success" type="view" value="main"/>
-        <response name="error" type="view" value="error"/>
-    </request-map>
-
     <request-map uri="advancedsearch">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="advancedsearch"/>

Modified: ofbiz/branches/jackrabbit20120501/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml?rev=1355450&r1=1355449&r2=1355450&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml (original)
+++ ofbiz/branches/jackrabbit20120501/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml Fri Jun 29 15:44:16 2012
@@ -39,12 +39,6 @@ under the License.
 
     <!-- Request Mappings -->
 
-    <request-map uri="changeDelegator">
-        <event type="java" path="org.ofbiz.webapp.event.CoreEvents" invoke="changeDelegator"/>
-        <response name="success" type="view" value="main"/>
-        <response name="error" type="view" value="error"/>
-    </request-map>
-
     <request-map uri="view">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="main"/>

Modified: ofbiz/branches/jackrabbit20120501/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/build.xml?rev=1355450&r1=1355449&r2=1355450&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/build.xml (original)
+++ ofbiz/branches/jackrabbit20120501/build.xml Fri Jun 29 15:44:16 2012
@@ -150,13 +150,6 @@ under the License.
         </subant>
     </target>
 
-    <target name="download-selenium"
-          description="Download the selenium server v1.0.3 20.8 MB download">
-        <subant target="install-seleniumxml">
-            <filelist dir="." files="framework/testtools/build.xml"/>
-        </subant>
-    </target>
-
     <target name="tests" depends="ofbiz-init">
         <subant target="tests">
             <filelist dir="." files="framework/build.xml"/>

Modified: ofbiz/branches/jackrabbit20120501/framework/base/dtd/ofbiz-component.xsd
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/base/dtd/ofbiz-component.xsd?rev=1355450&r1=1355449&r2=1355450&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/base/dtd/ofbiz-component.xsd (original)
+++ ofbiz/branches/jackrabbit20120501/framework/base/dtd/ofbiz-component.xsd Fri Jun 29 15:44:16 2012
@@ -29,6 +29,7 @@ under the License.
                 <xs:element minOccurs="0" maxOccurs="unbounded" ref="test-suite"/>
                 <xs:element minOccurs="0" maxOccurs="unbounded" ref="keystore"/>
                 <xs:element minOccurs="0" maxOccurs="unbounded" ref="webapp"/>
+                <xs:element minOccurs="0" maxOccurs="unbounded" ref="container"/>
             </xs:sequence>
             <xs:attributeGroup ref="attlist.ofbiz-component"/>
         </xs:complexType>
@@ -242,6 +243,38 @@ under the License.
         <xs:attribute type="xs:string" name="name" use="required"/>
         <xs:attribute type="xs:string" name="value" use="required"/>
     </xs:attributeGroup>
+
+    <xs:element name="container">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" maxOccurs="unbounded" ref="property"/>
+            </xs:sequence>
+            <xs:attributeGroup ref="attlist.container"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:attributeGroup name="attlist.container">
+        <xs:attribute type="xs:string" name="name" use="required"/>
+        <xs:attribute type="xs:string" name="class" use="required"/>
+    </xs:attributeGroup>
+    <xs:element name="property">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" maxOccurs="unbounded" ref="property"/>
+                <xs:element minOccurs="0" ref="property-value"/>
+            </xs:sequence>
+            <xs:attributeGroup ref="attlist.property"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:attributeGroup name="attlist.property">
+        <xs:attribute type="xs:string" name="name" use="required"/>
+        <xs:attribute type="xs:string" name="value"/>
+    </xs:attributeGroup>
+    <xs:element name="property-value" type="any"/>
+    <xs:complexType name="any" mixed="true">
+        <xs:sequence>
+            <xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
+        </xs:sequence>
+    </xs:complexType>
 </xs:schema>
 <!--
     <ofbiz-component name="core">

Modified: ofbiz/branches/jackrabbit20120501/framework/base/src/org/ofbiz/base/component/ComponentConfig.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/base/src/org/ofbiz/base/component/ComponentConfig.java?rev=1355450&r1=1355449&r2=1355450&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/base/src/org/ofbiz/base/component/ComponentConfig.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/base/src/org/ofbiz/base/component/ComponentConfig.java Fri Jun 29 15:44:16 2012
@@ -33,6 +33,8 @@ import javax.xml.parsers.ParserConfigura
 import javolution.util.FastList;
 import javolution.util.FastMap;
 
+import org.ofbiz.base.container.ContainerConfig;
+import org.ofbiz.base.container.ContainerException;
 import org.ofbiz.base.location.FlexibleLocation;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.KeyStoreUtil;
@@ -224,6 +226,20 @@ public class ComponentConfig {
         return webappInfos;
     }
 
+    public static List<ContainerConfig.Container> getAllContainers() {
+        return getAllContainers(null);
+    }
+
+    public static List<ContainerConfig.Container> getAllContainers(String componentName) {
+        List<ContainerConfig.Container> containers = FastList.newInstance();
+        for (ComponentConfig cc: getAllComponents()) {
+            if (componentName == null || componentName.equals(cc.getComponentName())) {
+                containers.addAll(cc.getContainers());
+            }
+        }
+        return containers;
+    }
+
     public static boolean isFileResourceLoader(String componentName, String resourceLoaderName) throws ComponentException {
         ComponentConfig cc = ComponentConfig.getComponentConfig(componentName);
         if (cc == null) {
@@ -339,6 +355,7 @@ public class ComponentConfig {
     protected List<TestSuiteInfo> testSuiteInfos = FastList.newInstance();
     protected List<KeystoreInfo> keystoreInfos = FastList.newInstance();
     protected List<WebappInfo> webappInfos = FastList.newInstance();
+    protected List<ContainerConfig.Container> containers = FastList.newInstance();
 
     protected ComponentConfig() {}
 
@@ -423,6 +440,13 @@ public class ComponentConfig {
             this.webappInfos.add(webappInfo);
         }
 
+        // containers
+        try {
+            this.containers.addAll(ContainerConfig.getContainers(xmlUrl));
+        } catch(ContainerException ce) {
+            throw new ComponentException("Error reading containers for component: " + this.globalName, ce);
+        }
+
         if (Debug.verboseOn()) Debug.logVerbose("Read component config : [" + rootLocation + "]", module);
     }
 
@@ -552,6 +576,10 @@ public class ComponentConfig {
         return this.webappInfos;
     }
 
+    public List<ContainerConfig.Container> getContainers() {
+        return this.containers;
+    }
+
     public boolean enabled() {
         return this.enabled;
     }

Modified: ofbiz/branches/jackrabbit20120501/framework/base/src/org/ofbiz/base/container/ContainerLoader.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/base/src/org/ofbiz/base/container/ContainerLoader.java?rev=1355450&r1=1355449&r2=1355450&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/base/src/org/ofbiz/base/container/ContainerLoader.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/base/src/org/ofbiz/base/container/ContainerLoader.java Fri Jun 29 15:44:16 2012
@@ -28,6 +28,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
+import org.ofbiz.base.component.ComponentConfig;
 import org.ofbiz.base.start.Config;
 import org.ofbiz.base.start.StartupException;
 import org.ofbiz.base.start.StartupLoader;
@@ -118,6 +119,12 @@ public class ContainerLoader implements
         if (this.unloading) {
             return;
         }
+        List<ContainerConfig.Container> containersDefinedInComponents = ComponentConfig.getAllContainers();
+        for (ContainerConfig.Container containerCfg: containersDefinedInComponents) {
+            Container tmpContainer = loadContainer(containerCfg, args);
+            this.loadedContainers.add(tmpContainer);
+            containerMap.put(containerCfg.name, tmpContainer);
+        }
         // Get hot-deploy container configuration files
         ClassLoader loader = Thread.currentThread().getContextClassLoader();
         Enumeration<URL> resources;

Modified: ofbiz/branches/jackrabbit20120501/framework/bi/webapp/bi/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/bi/webapp/bi/WEB-INF/controller.xml?rev=1355450&r1=1355449&r2=1355450&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/bi/webapp/bi/WEB-INF/controller.xml (original)
+++ ofbiz/branches/jackrabbit20120501/framework/bi/webapp/bi/WEB-INF/controller.xml Fri Jun 29 15:44:16 2012
@@ -30,12 +30,6 @@
         <response name="success" type="view" value="main"/>
     </request-map>
 
-    <request-map uri="changeDelegator">
-        <event type="java" path="org.ofbiz.webapp.event.CoreEvents" invoke="changeDelegator"/>
-        <response name="success" type="view" value="main"/>
-        <response name="error" type="view" value="error"/>
-    </request-map>
-
     <request-map uri="main">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="main"/>

Modified: ofbiz/branches/jackrabbit20120501/framework/common/config/SecurityUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/common/config/SecurityUiLabels.xml?rev=1355450&r1=1355449&r2=1355450&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/common/config/SecurityUiLabels.xml (original)
+++ ofbiz/branches/jackrabbit20120501/framework/common/config/SecurityUiLabels.xml Fri Jun 29 15:44:16 2012
@@ -52,6 +52,7 @@
         <value xml:lang="zh_TW">(從列表)把權限添加到安全組</value>
     </property>
     <property key="AddProtectedViewToSecurityGroup">
+        <value xml:lang="de">Geschützte Ansicht zu Sicherheitsgruppe hinzufügen</value>
         <value xml:lang="en">Add a Protected View to SecurityGroup</value>
         <value xml:lang="es">Añadir una vista protegida a grupo de seguridad</value>
         <value xml:lang="fr">Ajouter une vue protégée à ce groupe de sécurité</value>
@@ -91,6 +92,7 @@
         <value xml:lang="zh_TW">元件</value>
     </property>
     <property key="CertDetails">
+        <value xml:lang="de">Zertifikats-Details</value>
         <value xml:lang="en">Cert Details</value>
         <value xml:lang="es">Detalles del certificado</value>
         <value xml:lang="pt_BR">Detalhes do certificado</value>
@@ -229,6 +231,7 @@
         <value xml:lang="zh_TW">建立使用者登入</value>
     </property>
     <property key="FindUserLogin">
+        <value xml:lang="de">Benutzer Login suchen</value>
         <value xml:lang="en">Find User Login</value>
         <value xml:lang="es">Buscar nombre de usuario</value>
         <value xml:lang="it">Ricerca utenti</value>
@@ -265,6 +268,7 @@
         <value xml:lang="zh_TW">目前密碼驗証</value>
     </property>
     <property key="FormFieldTitle_disabledDateTime">
+        <value xml:lang="de">Deaktiviert am</value>
         <value xml:lang="en">Disabled Date Time</value>
         <value xml:lang="es">Deshabilitado el</value>
         <value xml:lang="it">Disabilitato dal</value>
@@ -288,16 +292,19 @@
         <value xml:lang="zh_TW">有效</value>
     </property>
     <property key="FormFieldTitle_externalAuthId">
+        <value xml:lang="de">Externe Authentifizierungs-ID</value>
         <value xml:lang="en">External Auth Id</value>
         <value xml:lang="es">Código de autentificación externa</value>
         <value xml:lang="it">Codice autenticazione esterna</value>
     </property>
     <property key="FormFieldTitle_hasLoggedOut">
+        <value xml:lang="de">Hat sich abgemeldet</value>
         <value xml:lang="en">Has Logged Out</value>
         <value xml:lang="es">Se ha desconectado</value>
         <value xml:lang="it">Uscito dal sistema</value>
     </property>
     <property key="FormFieldTitle_maxHits">
+        <value xml:lang="de">Maximale Anzahl der Besuche</value>
         <value xml:lang="en">Maximum number of visits</value>
         <value xml:lang="es">Número máximo de visitas</value>
         <value xml:lang="fr">Nombre maximum de visites</value>
@@ -309,6 +316,7 @@
         <value xml:lang="zh_TW">最大訪問數量</value>
     </property>
     <property key="FormFieldTitle_maxHitsDuration">
+        <value xml:lang="de">Zeitspanne die für einen Besuch angenommen werden (in Sekunden)</value>
         <value xml:lang="en">Duration during which the visits are considered (in seconds)</value>
         <value xml:lang="es">Período durante el que las visitas son consideradas (en segundos)</value>
         <value xml:lang="fr">Durée pendant laquelle les visites sont considérées (en secondes)</value>
@@ -348,11 +356,13 @@
         <value xml:lang="zh_TW">新密碼驗証</value>
     </property>
     <property key="FormFieldTitle_passwordHint">
+        <value xml:lang="de">Passwort Hinweis</value>
         <value xml:lang="en">Password Hint</value>
         <value xml:lang="es">Pista para la clave</value>
         <value xml:lang="it">Suggerimento password</value>
     </property>
     <property key="FormFieldTitle_requirePasswordChange">
+        <value xml:lang="de">Passwortänderung benötigt</value>
         <value xml:lang="en">Require Password Change</value>
         <value xml:lang="es">Debe cambiar la clave</value>
         <value xml:lang="fr">Changement mot de passe obligatoire</value>
@@ -363,11 +373,13 @@
         <value xml:lang="zh_TW">必須修改密碼</value>
     </property>
     <property key="FormFieldTitle_successiveFailedLogins">
+        <value xml:lang="de">Fehlgeschlagene, aufeinanderfolgende Anmeldeversuche</value>
         <value xml:lang="en">Successive Failed Logins</value>
         <value xml:lang="es">Intentos de acceso fallidos</value>
         <value xml:lang="it">Accessi falliti consecutivi</value>
     </property>
     <property key="FormFieldTitle_tarpitDuration">
+        <value xml:lang="de">Zeitspanne für die die Ansicht nicht angezeigt wird (in Sekunden)</value>
         <value xml:lang="en">Duration during which the view will not be accessible (in seconds)</value>
         <value xml:lang="es">Período durante el cual la vista no será accesible (en segundos)</value>
         <value xml:lang="fr">Durée pendant laquelle la vue ne sera plus accessible (en secondes)</value>
@@ -405,6 +417,7 @@
         <value xml:lang="zh_TW">使用者登入ID</value>
     </property>
     <property key="FormFieldTitle_viewNameId">
+        <value xml:lang="de">Ansicht Name</value>
         <value xml:lang="en">View Name</value>
         <value xml:lang="es">Nombre de la vista</value>
         <value xml:lang="fr">Nom de la vue</value>
@@ -415,6 +428,7 @@
         <value xml:lang="zh_TW">瀏覽名稱</value>
     </property>
     <property key="LookupUserLogin">
+        <value xml:lang="de">Benutzer Anmeldung suchen</value>
         <value xml:lang="en">Lookup User Login</value>
         <value xml:lang="es">Buscar nombre de usuario</value>
         <value xml:lang="pt_BR">Pesquisar Nome de Usuário</value>
@@ -571,6 +585,7 @@
         <value xml:lang="zh_TW">權限</value>
     </property>
     <property key="ProtectedViews">
+        <value xml:lang="de">Geschützte Ansichten</value>
         <value xml:lang="en">Protected Views</value>
         <value xml:lang="es">Vistas protegidas</value>
         <value xml:lang="fr">Vues protégées</value>
@@ -629,6 +644,7 @@
         <value xml:lang="zh_TW">SecurityViewPermissionError 你沒有權限瀏覽本頁面。 (需要"SECURITY_VIEW" 或 "SECURITY_ADMIN")</value>
     </property>
     <property key="UserLogin">
+        <value xml:lang="de">Benutzeranmeldung</value>
         <value xml:lang="en">User Login</value>
         <value xml:lang="es">Nombre de usuario</value>
         <value xml:lang="it">Utente</value>

Modified: ofbiz/branches/jackrabbit20120501/framework/entity/src/org/ofbiz/entity/GenericDelegator.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/entity/src/org/ofbiz/entity/GenericDelegator.java?rev=1355450&r1=1355449&r2=1355450&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/entity/src/org/ofbiz/entity/GenericDelegator.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/entity/src/org/ofbiz/entity/GenericDelegator.java Fri Jun 29 15:44:16 2012
@@ -76,7 +76,6 @@ import org.ofbiz.entity.util.EntityCrypt
 import org.ofbiz.entity.util.EntityFindOptions;
 import org.ofbiz.entity.util.EntityListIterator;
 import org.ofbiz.entity.util.SequenceUtil;
-//import org.ofbiz.service.ServiceDispatcher;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
@@ -105,7 +104,6 @@ public class GenericDelegator implements
     protected Cache cache = null;
 
     protected DistributedCacheClear distributedCacheClear = null;
-    protected boolean enableJMS = true;
     protected EntityEcaHandler<?> entityEcaHandler = null;
     protected SequenceUtil sequencer = null;
     protected EntityCrypto crypto = null;
@@ -2922,9 +2920,6 @@ public class GenericDelegator implements
         }
     }
     
-    /* (non-Javadoc)
-     * @see org.ofbiz.entity.Delegator#getEnableJMS()
-     */
     public boolean useDistributedCacheClear() {
         return this.getDelegatorInfo().useDistributedCacheClear;
     }

Modified: ofbiz/branches/jackrabbit20120501/framework/images/webapp/images/fieldlookup.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/images/webapp/images/fieldlookup.js?rev=1355450&r1=1355449&r2=1355450&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/images/webapp/images/fieldlookup.js (original)
+++ ofbiz/branches/jackrabbit20120501/framework/images/webapp/images/fieldlookup.js Fri Jun 29 15:44:16 2012
@@ -173,7 +173,7 @@ function initiallyCollapseDelayed() {
 /*******************************************************************************
  * Lookup Object
  ******************************************************************************/
-var Lookup = function (options) {
+var Lookup = function(options) {
  var _newInputBoxId, _lookupId, _inputBox, _lookupContainer, _backgroundCloseClickEvent;
 
  options = {
@@ -322,7 +322,7 @@ var Lookup = function (options) {
 
  success : function(data) {
  _lookupContainer.html(data);
- new ButtonModifier(_lookupId).modifySubmitButton();
+ new ButtonModifier(_lookupId).modifyLookupLinks();
  },
 
  error : function(xhr, reason, exception) {
@@ -330,7 +330,7 @@ var Lookup = function (options) {
  alert("An error occurred while communicating with the server:\n\n\nreason=" + reason + "\n\nexception=" + exception);
  }
  location.reload(true);
- },
+ }
  });
  }
 
@@ -404,7 +404,7 @@ var Lookup = function (options) {
 /*******************************************************************************
  * Lookup Counter Object
  ******************************************************************************/
-var FieldLookupCounter = function () {
+var FieldLookupCounter = function() {
  this.refArr = {};
 
  this.setReference = function(key, ref) {
@@ -454,16 +454,57 @@ var GLOBAL_LOOKUP_REF = new FieldLookupC
 /*******************************************************************************
  * Button Modifier Object
  ******************************************************************************/
-var ButtonModifier = function (lookupDiv) {
+var ButtonModifier = function(lookupDiv) {
 
- function _modifySubmitButton() {
+ function _modifyLookupLinks() {
  if (!lookupDiv) {
  return;
  }
 
  _modifyCollapseable();
 
- // find the lookup form and input button
+ _modifySubmitButton();
+
+ _modifyPagination();
+
+ _modifyResultTable();
+ }
+
+ function _modifyCollapseable() {
+
+ var slTitleBars = jQuery("#" + lookupDiv + " .screenlet-title-bar");
+
+ jQuery.each(slTitleBars, function(i) {
+ var slTitleBar = slTitleBars[i];
+ var ul = slTitleBar.firstChild;
+ if ((typeof ul) != 'object') {
+ return true;
+ }
+ var childElements = ul.childNodes;
+
+ for (j in childElements) {
+ if (childElements[j].className == 'expanded' || childElements[j].className == 'collapsed') {
+ break;
+ }
+ }
+
+ _getNextCollapseSeq();
+ var childEle = childElements[j].firstChild;
+
+ childEle.setAttribute('onclick', "javascript:toggleScreenlet(this, 'lec" + COLLAPSE_SEQUENCE_NUMBER
+ + "', 'true', 'Expand', 'Collapse');");
+ childEle.href = "javascript:void(0);"
+ jQuery(slTitleBar).next('div').attr('id', 'lec' + COLLAPSE_SEQUENCE_NUMBER);
+
+ });
+ }
+
+ function _getNextCollapseSeq() {
+ COLLAPSE_SEQUENCE_NUMBER++;
+ return COLLAPSE_SEQUENCE_NUMBER;
+ }
+
+ function _modifySubmitButton() {
  var lookupForm = jQuery("#" + lookupDiv + " form:first");
 
  // set new form name and id
@@ -471,10 +512,12 @@ var ButtonModifier = function (lookupDiv
  lookupForm.attr("name", "form_" + lookupDiv);
  lookupForm.attr("id", "form_" + lookupDiv);
  lookupForm = jQuery("#form_" + lookupDiv);
+
  // set new links for lookups
  var newLookups = jQuery("#" + lookupDiv + " .field-lookup");
 
  var formAction = lookupForm.attr("action");
+
  // remove the form action
  lookupForm.attr("action", "");
  var input = jQuery("#" + lookupDiv + " input[type=submit]").css({
@@ -482,7 +525,6 @@ var ButtonModifier = function (lookupDiv
  });
 
  // remove the original input button and replace with a new one
-
  var txt = input.attr("value");
  (input.parent()).append(jQuery("<button/>", {
  id : "lookupSubmitButton",
@@ -495,6 +537,9 @@ var ButtonModifier = function (lookupDiv
  }));
 
  input.remove();
+ }
+
+ function _modifyPagination() {
  // modify nav-pager
  var navPagers = jQuery("#" + lookupDiv + " .nav-pager a");
  jQuery.each(navPagers, function(navPager) {
@@ -504,105 +549,72 @@ var ButtonModifier = function (lookupDiv
 
  var navPagersSelect = jQuery("#" + lookupDiv + " .nav-pager select");
  jQuery.each(navPagersSelect, function(navPager) {
- // that's quite weird maybe someone have a better idea ...
- // that's
- // where the magic happens
- try {
- var oc = jQuery(navPagersSelect[navPager]).attr("onchange");
- if ((typeof oc) == "function") { // IE6/7 Fix
- oc = oc.toString();
- var ocSub = oc.substring((oc.indexOf('=') + 3), (oc.length - 4));
- // define search pattern we must seperate between IE and
- // Other Browser
- var searchPattern = /" \+ this.value \+ "/g;
- var searchPattern_IE = /'\+this.value\+'/g;
- var searchPattern2 = /" \+ this.valu/g;
- var searchPattern2_IE = /'\+this.valu/g;
-
+ var onChangeEvent = jQuery(navPagersSelect[navPager]).attr("onchange");
+ if ((typeof onChangeEvent) == "function") { // IE6/7 Fix
+ onChangeEvent = onChangeEvent.toString();
+ var ocSub = onChangeEvent.substring((onChangeEvent.indexOf('=') + 3), (onChangeEvent.length - 4));
+ // define search pattern we must seperate between IE and
+ // Other Browser
+ var searchPattern = /" \+ this.value \+ "/g;
+ var searchPattern_IE = /'\+this.value\+'/g;
+ var searchPattern2 = /" \+ this.valu/g;
+ var searchPattern2_IE = /'\+this.valu/g;
+
+ if (searchPattern.test(ocSub)) {
+ var viewSize = navPagersSelect[navPager].value;
+ var spl = ocSub.split(searchPattern);
+ navPagersSelect[navPager].onchange = function() {
+ lookupPaginationAjaxRequest(spl[0] + this.value + spl[1], 'select');
+ };
+ } else if (searchPattern_IE.test(ocSub)) {
+ var viewSize = navPagersSelect[navPager].value;
+ var spl = ocSub.split(searchPattern_IE);
+ navPagersSelect[navPager].onchange = function() {
+ lookupPaginationAjaxRequest("/" + spl[0] + this.value + spl[1], 'select');
+ };
+ } else if (searchPattern2.test(ocSub)) {
+ ocSub = ocSub.replace(searchPattern2, "");
  if (searchPattern.test(ocSub)) {
- var viewSize = navPagersSelect[navPager].value;
- var spl = ocSub.split(searchPattern);
- navPagersSelect[navPager].onchange = function() {
- lookupPaginationAjaxRequest(spl[0] + this.value + spl[1], 'select');
- };
- } else if (searchPattern_IE.test(ocSub)) {
- var viewSize = navPagersSelect[navPager].value;
- var spl = ocSub.split(searchPattern_IE);
- navPagersSelect[navPager].onchange = function() {
- lookupPaginationAjaxRequest("/" + spl[0] + this.value + spl[1], 'select');
- };
- } else if (searchPattern2.test(ocSub)) {
- ocSub = ocSub.replace(searchPattern2, "");
- if (searchPattern.test(ocSub)) {
- ocSub.replace(searchPattern, viewSize);
- }
- navPagersSelect[navPager].onchange = function() {
- lookupPaginationAjaxRequest(ocSub + this.value, 'select');
- };
- } else if (searchPattern2_IE.test(ocSub)) {
- ocSub = ocSub.replace(searchPattern2_IE, "");
- if (searchPattern_IE.test(ocSub)) {
- ocSub.replace(searchPattern_IE, viewSize);
- }
- navPagersSelect[navPager].onchange = function() {
- lookupPaginationAjaxRequest("/" + ocSub + this.value, 'select');
- };
- }
- } else {
- var ocSub = oc.substring((oc.indexOf('=') + 1), (oc.length - 1));
- navPagersSelect[navPager].setAttribute("onchange", "lookupPaginationAjaxRequest(" + ocSub + ",'')");
- }
-
- if (resultTable == null) {
- return;
- }
- resultTable = resultTable.childElements()[0];
- var resultElements = resultTable.childElements();
- for (i in resultElements) {
- var childElements = resultElements[i].childElements();
- if (childElements.size() == 1) {
- continue;
+ ocSub.replace(searchPattern, viewSize);
  }
- for (k = 1; k < childElements.size(); k++) {
- var cell = childElements[k];
- var cellChild = null;
- cellChild = cell.childElements();
- if (cellChild.size() > 0) {
- for (l in cellChild) {
- var cellElement = cellChild[l];
- if (cellElement.tagName == 'A') {
- var link = cellElement.href;
- var liSub = link.substring(link.lastIndexOf('/') + 1, (link.length));
- if (liSub.indexOf("javascript:set_") != -1) {
- cellElement.href = link;
- } else {
- cellElement.href = "javascript:lookupAjaxRequest('" + liSub + "&presentation=layer')";
- }
- }
- }
- }
+ navPagersSelect[navPager].onchange = function() {
+ lookupPaginationAjaxRequest(ocSub + this.value, 'select');
+ };
+ } else if (searchPattern2_IE.test(ocSub)) {
+ ocSub = ocSub.replace(searchPattern2_IE, "");
+ if (searchPattern_IE.test(ocSub)) {
+ ocSub.replace(searchPattern_IE, viewSize);
  }
+ navPagersSelect[navPager].onchange = function() {
+ lookupPaginationAjaxRequest("/" + ocSub + this.value, 'select');
+ };
  }
- } catch (ex) {
+ } else {
+ var ocSub = onChangeEvent.substring((onChangeEvent.indexOf('=') + 1), (onChangeEvent.length - 1));
+ navPagersSelect[navPager].setAttribute("onchange", "lookupPaginationAjaxRequest(" + ocSub + ",'')");
  }
  });
- // modify links in result table ...
+ }
+
+ function _modifyResultTable() {
  var resultTable = jQuery("#" + lookupDiv + " #search-results table:first tbody");
- var tableChildren = resultTable.children();
- jQuery.each(tableChildren, function(tableChild) {
- var childElements = jQuery(tableChildren[tableChild]);
- var tableRow = childElements.children();
- jQuery.each(tableRow, function(cell) {
- var cellChild = null;
- cellChild = jQuery(tableRow[cell]).children();
- jQuery.each(cellChild, function(child) {
- if (cellChild[child].tagName == "A") {
- var link = cellChild[child].href;
+ var tableChilds = resultTable.children();
+
+ jQuery.each(tableChilds, function(tableChild) {
+ var childElements = jQuery(tableChilds[tableChild]);
+ var tableRows = childElements.children();
+
+ jQuery.each(tableRows, function(cell) {
+ var cellChilds = jQuery(tableRows[cell]).children();
+
+ jQuery.each(cellChilds, function(child) {
+ if (cellChilds[child].tagName == "A") {
+ var link = cellChilds[child].href;
  var liSub = link.substring(link.lastIndexOf('/') + 1, (link.length));
  if (liSub.indexOf("javascript:set_") != -1) {
- cellChild[child].href = link;
+ cellChilds[child].href = link;
  } else {
- cellChild[child].href = "javascript:lookupAjaxRequest('" + liSub + "&presentation=layer')";
+ cellChilds[child].href = "javascript:lookupAjaxRequest('" + liSub + "&presentation=layer')";
  }
  }
  });
@@ -612,42 +624,8 @@ var ButtonModifier = function (lookupDiv
  });
  }
 
- function _modifyCollapseable() {
-
- var slTitleBars = jQuery("#" + lookupDiv + " .screenlet-title-bar");
-
- jQuery.each(slTitleBars, function(i) {
- var slTitleBar = slTitleBars[i];
- var ul = slTitleBar.firstChild;
- if ((typeof ul) != 'object') {
- return true;
- }
- var childElements = ul.childNodes;
-
- for (j in childElements) {
- if (childElements[j].className == 'expanded' || childElements[j].className == 'collapsed') {
- break;
- }
- }
-
- _getNextCollapseSeq();
- var childEle = childElements[j].firstChild;
-
- childEle.setAttribute('onclick', "javascript:toggleScreenlet(this, 'lec" + COLLAPSE_SEQUENCE_NUMBER
- + "', 'true', 'Expand', 'Collapse');");
- childEle.href = "javascript:void(0);"
- jQuery(slTitleBar).next('div').attr('id', 'lec' + COLLAPSE_SEQUENCE_NUMBER);
-
- });
- }
-
- function _getNextCollapseSeq() {
- COLLAPSE_SEQUENCE_NUMBER++;
- return COLLAPSE_SEQUENCE_NUMBER;
- }
-
  return {
- modifySubmitButton : _modifySubmitButton
+ modifyLookupLinks : _modifyLookupLinks
  }
 }
 
@@ -660,7 +638,7 @@ function lookupAjaxRequest(request) {
  request = request.substring(0, request.indexOf('?'));
  lookupId = GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP).lookupId;
  jQuery("#" + lookupId).load(request, arg, function(data) {
- new ButtonModifier(lookupId).modifySubmitButton();
+ new ButtonModifier(lookupId).modifyLookupLinks();
  });
 }
 
@@ -694,7 +672,7 @@ function lookupFormAjaxRequest(formActio
  jQuery("span.indicator").remove();
  }
  jQuery("#" + lookupId).html(result);
- new ButtonModifier(lookupId).modifySubmitButton();
+ new ButtonModifier(lookupId).modifyLookupLinks();
  }
  });
 }
@@ -729,7 +707,7 @@ function lookupPaginationAjaxRequest(nav
  jQuery("span.indicator").remove();
  }
  jQuery("#" + lookupId).html(result);
- new ButtonModifier(lookupId).modifySubmitButton();
+ new ButtonModifier(lookupId).modifyLookupLinks();
  }
  });
 }
@@ -845,7 +823,7 @@ function closeLookup() {
  * Lookup Description Helper
  ******************************************************************************/
 // load description for lookup fields
-var lookupDescriptionLoaded = function (fieldId, url, params, formName) {
+var lookupDescriptionLoaded = function(fieldId, url, params, formName) {
  this.init(fieldId, url, params, formName);
 }
 lookupDescriptionLoaded.prototype.init = function(fieldId, url, params, formName) {
@@ -859,8 +837,14 @@ lookupDescriptionLoaded.prototype.update
  if (tooltipElement.length) {// first remove current description
  tooltipElement.remove();
  }
+
+ var indexOf = this.params.indexOf("searchValueFieldName");
+ if (indexOf == -1) {
+ return;
+ }
+
  // actual server call
- var fieldName = this.params.substring(this.params.indexOf("searchValueFieldName"));
+ var fieldName = this.params.substring(indexOf);
  fieldName = fieldName.substring(fieldName.indexOf("=") + 1);
  if (jQuery("input[name=" + fieldName + "]").val()) {
  var fieldSerialized = jQuery("input[name=" + fieldName + "]", jQuery("form[name=" + this.formName + "]")).serialize();

Modified: ofbiz/branches/jackrabbit20120501/framework/images/webapp/images/selectall.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/images/webapp/images/selectall.js?rev=1355450&r1=1355449&r2=1355450&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/images/webapp/images/selectall.js (original)
+++ ofbiz/branches/jackrabbit20120501/framework/images/webapp/images/selectall.js Fri Jun 29 15:44:16 2012
@@ -304,7 +304,7 @@ function ajaxUpdateAreaPeriodic(areaId,
                 },
                 error: function(data) {waitSpinnerHide()}
             });
-            
+
         }
     });
 }
@@ -398,19 +398,19 @@ function ajaxSubmitFormUpdateAreas(form,
 function ajaxAutoCompleter(areaCsvString, showDescription, defaultMinLength, defaultDelay, formName){
     var areaArray = areaCsvString.replace(/&amp;/g, '&').split(",");
     var numAreas = parseInt(areaArray.length / 3);
-    
+
     for (var i = 0; i < numAreas * 3; i = i + 3) {
         var initUrl = areaArray[i + 1];
         if (initUrl.indexOf("?") > -1)
             var url = initUrl + "&" + areaArray[i + 2];
-        else
+        else
             var url = initUrl + "?" + areaArray[i + 2];
         var div = areaArray[i];
         // create a separated div where the result JSON Opbject will be placed
         if ((jQuery("#" + div + "_auto")).length < 1) {
             jQuery("<div id='" + div + "_auto'></div>").insertBefore("#" + areaArray[i]);
         }
-        
+
         jQuery("#" + div).autocomplete({
             minLength: defaultMinLength,
             delay: defaultDelay,
@@ -447,13 +447,13 @@ function ajaxAutoCompleter(areaCsvString
                         if(exception != 'abort') {
                             alert("An error occurred while communicating with the server:\n\n\nreason=" + reason + "\n\nexception=" + exception);
                         }
-                    },
+                    }
                 });
             },
             select: function(event, ui){
                 //jQuery("#" + areaArray[0]).html(ui.item);
-                jQuery("#" + areaArray[0]).val(ui.item.value); // setting a text field  
-                if (showDescription && (ui.item.value != undefined && ui.item.value != '')) {
+                jQuery("#" + areaArray[0]).val(ui.item.value); // setting a text field
+                if (showDescription && (ui.item.value != undefined && ui.item.value != '')) {
                     setLookDescription(areaArray[0], ui.item.label, areaArray[2], formName, showDescription)
                 }
             }
@@ -473,8 +473,8 @@ function setLookDescription(textFieldId,
         var start = description.lastIndexOf(' [');
         if (start != -1) {
             description = description.substring(0, start);
-            
-            // This sets a (possibly hidden) dependent field if a description-field-name is provided  
+
+            // This sets a (possibly hidden) dependent field if a description-field-name is provided
             var dependentField = params.substring(params.indexOf("searchValueFieldName"));
             dependentField = jQuery("#" + formName + "_" + dependentField.substring(dependentField.indexOf("=") + 1));
             var dependentFieldValue = description.substring(0, description.lastIndexOf(' '))
@@ -534,7 +534,7 @@ function ajaxAutoCompleteDropDown() {
                         }) );
                     },
                     select: function( event, ui ) {
-                        ui.item.option.selected = true;                        
+                        ui.item.option.selected = true;
                         //select.val( ui.item.option.value );
                         self._trigger( "selected", event, {
                             item: ui.item.option
@@ -752,7 +752,7 @@ function submitFormEnableButton(button)
 
 /**
  * Expands or collapses all groups of one portlet
- *
+ *
  * @param bool <code>true</code> to expand, <code>false</code> otherwise
  * @param portalPortletId The id of the portlet
  */
@@ -767,7 +767,7 @@ function expandAllP(bool, portalPortletI
 
 /**
  * Expands or collapses all groups of the page
- *
+ *
  * @param bool <code>true</code> to expand, <code>false</code> otherwise
  */
 function expandAll(bool) {
@@ -800,7 +800,7 @@ function waitSpinnerShow() {
     lookupTop = (scrollOffY + winHeight / 2) - (jSpinner.height() / 2);
 
     jSpinner.css("display", "block");
-    jSpinner.css("left", lookupLeft + "px");
+    jSpinner.css("left", lookupLeft + "px");
     jSpinner.css("top", lookupTop + "px");
     jSpinner.show();
 }

Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallScript.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallScript.java?rev=1355450&r1=1355449&r2=1355450&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallScript.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/callops/CallScript.java Fri Jun 29 15:44:16 2012
@@ -22,7 +22,6 @@ import org.ofbiz.base.util.ScriptUtil;
 import org.ofbiz.base.util.Scriptlet;
 import org.ofbiz.base.util.StringUtil;
 import org.ofbiz.base.util.UtilXml;
-import org.ofbiz.base.util.string.FlexibleStringExpander;
 import org.ofbiz.minilang.MiniLangException;
 import org.ofbiz.minilang.MiniLangRuntimeException;
 import org.ofbiz.minilang.MiniLangUtil;
@@ -33,7 +32,9 @@ import org.ofbiz.minilang.method.MethodO
 import org.w3c.dom.Element;
 
 /**
- * Executes a script.
+ * Implements the &lt;script&gt; element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Cscript%3E}}">Mini-language Reference</a>
  */
 public final class CallScript extends MethodOperation {
 
@@ -70,17 +71,11 @@ public final class CallScript extends Me
         if (elementModified && MiniLangUtil.autoCorrectOn()) {
             MiniLangUtil.flagDocumentAsCorrected(element);
         }
-        String inlineScript = element.getAttribute("script");
-        if (inlineScript.length() == 0) {
-            inlineScript = UtilXml.elementValue(element);
-        }
-        if (inlineScript != null && MiniLangUtil.containsScript(inlineScript)) {
-            this.scriptlet = new Scriptlet(StringUtil.convertOperatorSubstitutions(inlineScript));
+        String scriptLocation = element.getAttribute("location");
+        if (scriptLocation.isEmpty()) {
             this.location = null;
             this.method = null;
         } else {
-            this.scriptlet = null;
-            String scriptLocation = element.getAttribute("location");
             int pos = scriptLocation.lastIndexOf("#");
             if (pos == -1) {
                 this.location = scriptLocation;
@@ -90,22 +85,32 @@ public final class CallScript extends Me
                 this.method = scriptLocation.substring(pos + 1);
             }
         }
+        String inlineScript = element.getAttribute("script");
+        if (inlineScript.isEmpty()) {
+            inlineScript = UtilXml.elementValue(element);
+        }
+        if (inlineScript != null && MiniLangUtil.containsScript(inlineScript)) {
+            this.scriptlet = new Scriptlet(StringUtil.convertOperatorSubstitutions(inlineScript));
+        } else {
+            this.scriptlet = null;
+        }
     }
 
     @Override
     public boolean exec(MethodContext methodContext) throws MiniLangException {
+        if (this.location != null) {
+            if (location.endsWith(".xml")) {
+                SimpleMethod.runSimpleMethod(location, method, methodContext);
+            } else {
+                ScriptUtil.executeScript(this.location, this.method, methodContext.getEnvMap());
+            }
+        }
         if (this.scriptlet != null) {
             try {
                 this.scriptlet.executeScript(methodContext.getEnvMap());
             } catch (Exception e) {
                 throw new MiniLangRuntimeException(e.getMessage(), this);
             }
-            return true;
-        }
-        if (location.endsWith(".xml")) {
-            SimpleMethod.runSimpleMethod(location, method, methodContext);
-        } else {
-            ScriptUtil.executeScript(this.location, this.method, methodContext.getEnvMap());
         }
         return true;
     }
@@ -113,25 +118,30 @@ public final class CallScript extends Me
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder("<script ");
-        if (this.location != null && this.location.length() > 0) {
+        if (this.location != null) {
             sb.append("location=\"").append(this.location);
-            if (this.method != null && this.method.length() > 0) {
+            if (this.method != null) {
                 sb.append("#").append(this.method);
             }
             sb.append("\" ");
         }
         if (this.scriptlet != null) {
-            sb.append("scriptlet=\"").append(this.scriptlet).append("\" ");
+            sb.append("script=\"").append(this.scriptlet).append("\" ");
         }
         sb.append("/>");
         return sb.toString();
     }
 
+    /**
+     * A factory for the &lt;script&gt; element.
+     */
     public static final class CallScriptFactory implements Factory<CallScript> {
+        @Override
         public CallScript createMethodOperation(Element element, SimpleMethod simpleMethod) throws MiniLangException {
             return new CallScript(element, simpleMethod);
         }
 
+        @Override
         public String getName() {
             return "script";
         }

Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/FindByAnd.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/FindByAnd.java?rev=1355450&r1=1355449&r2=1355450&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/FindByAnd.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/FindByAnd.java Fri Jun 29 15:44:16 2012
@@ -18,10 +18,12 @@
  *******************************************************************************/
 package org.ofbiz.minilang.method.entityops;
 
+import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 
 import org.ofbiz.base.util.Debug;
+import org.ofbiz.base.util.UtilMisc;
 import org.ofbiz.base.util.collections.FlexibleMapAccessor;
 import org.ofbiz.base.util.string.FlexibleStringExpander;
 import org.ofbiz.entity.Delegator;
@@ -38,6 +40,8 @@ import org.w3c.dom.Element;
 
 /**
  * Implements the &lt;find-by-and&gt; element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Cfindbyand%3E}}">Mini-language Reference</a>
  */
 public final class FindByAnd extends MethodOperation {
 
@@ -45,6 +49,7 @@ public final class FindByAnd extends Met
 
     private final FlexibleStringExpander delegatorNameFse;
     private final FlexibleStringExpander entityNameFse;
+    private final FlexibleMapAccessor<Collection<String>> fieldsToSelectListFma;
     private final FlexibleMapAccessor<Object> listFma;
     private final FlexibleMapAccessor<Map<String, ? extends Object>> mapFma;
     private final FlexibleMapAccessor<List<String>> orderByListFma;
@@ -54,15 +59,16 @@ public final class FindByAnd extends Met
     public FindByAnd(Element element, SimpleMethod simpleMethod) throws MiniLangException {
         super(element, simpleMethod);
         if (MiniLangValidate.validationOn()) {
-            MiniLangValidate.attributeNames(simpleMethod, element, "entity-name", "use-cache", "use-iterator", "list", "map", "order-by-list", "delegator-name");
+            MiniLangValidate.attributeNames(simpleMethod, element, "entity-name", "use-cache", "fields-to-select-list", "use-iterator", "list", "map", "order-by-list", "delegator-name");
             MiniLangValidate.requiredAttributes(simpleMethod, element, "entity-name", "list", "map");
-            MiniLangValidate.expressionAttributes(simpleMethod, element, "list", "map", "order-by-list");
+            MiniLangValidate.expressionAttributes(simpleMethod, element, "list", "map", "fields-to-select-list", "order-by-list");
             MiniLangValidate.noChildElements(simpleMethod, element);
         }
         entityNameFse = FlexibleStringExpander.getInstance(element.getAttribute("entity-name"));
         listFma = FlexibleMapAccessor.getInstance(element.getAttribute("list"));
         mapFma = FlexibleMapAccessor.getInstance(element.getAttribute("map"));
         orderByListFma = FlexibleMapAccessor.getInstance(element.getAttribute("order-by-list"));
+        fieldsToSelectListFma = FlexibleMapAccessor.getInstance(element.getAttribute("fields-to-select-list"));
         useCacheFse = FlexibleStringExpander.getInstance(element.getAttribute("use-cache"));
         useIteratorFse = FlexibleStringExpander.getInstance(element.getAttribute("use-iterator"));
         delegatorNameFse = FlexibleStringExpander.getInstance(element.getAttribute("delegator-name"));
@@ -75,19 +81,21 @@ public final class FindByAnd extends Met
         boolean useCache = "true".equals(useCacheFse.expandString(methodContext.getEnvMap()));
         boolean useIterator = "true".equals(useIteratorFse.expandString(methodContext.getEnvMap()));
         List<String> orderByNames = orderByListFma.get(methodContext.getEnvMap());
+        Collection<String> fieldsToSelectList = fieldsToSelectListFma.get(methodContext.getEnvMap());
         Delegator delegator = methodContext.getDelegator();
         if (!delegatorName.isEmpty()) {
             delegator = DelegatorFactory.getDelegator(delegatorName);
         }
         try {
+            EntityCondition whereCond = null;
+            Map<String, ? extends Object> fieldMap = mapFma.get(methodContext.getEnvMap());
+            if (fieldMap != null) {
+                whereCond = EntityCondition.makeCondition(fieldMap);
+            }
             if (useIterator) {
-                EntityCondition whereCond = null;
-                if (!mapFma.isEmpty()) {
-                    whereCond = EntityCondition.makeCondition(mapFma.get(methodContext.getEnvMap()));
-                }
-                listFma.put(methodContext.getEnvMap(), delegator.find(entityName, whereCond, null, null, orderByNames, null));
+                listFma.put(methodContext.getEnvMap(), delegator.find(entityName, whereCond, null, UtilMisc.toSet(fieldsToSelectList), orderByNames, null));
             } else {
-                listFma.put(methodContext.getEnvMap(), delegator.findByAnd(entityName, mapFma.get(methodContext.getEnvMap()), orderByNames, useCache));
+                listFma.put(methodContext.getEnvMap(), delegator.findList(entityName, whereCond, UtilMisc.toSet(fieldsToSelectList), orderByNames, null, useCache));
             }
         } catch (GenericEntityException e) {
             String errMsg = "Exception thrown while performing entity find: " + e.getMessage();
@@ -112,6 +120,9 @@ public final class FindByAnd extends Met
         if (!orderByListFma.isEmpty()) {
             sb.append("order-by-list=\"").append(this.orderByListFma).append("\" ");
         }
+        if (!fieldsToSelectListFma.isEmpty()) {
+            sb.append("fields-to-select-list=\"").append(this.fieldsToSelectListFma).append("\" ");
+        }
         if (!useCacheFse.isEmpty()) {
             sb.append("use-cache=\"").append(this.useCacheFse).append("\" ");
         }

Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/FindByPrimaryKey.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/FindByPrimaryKey.java?rev=1355450&r1=1355449&r2=1355450&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/FindByPrimaryKey.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/entityops/FindByPrimaryKey.java Fri Jun 29 15:44:16 2012
@@ -41,6 +41,8 @@ import org.w3c.dom.Element;
 
 /**
  * Implements the &lt;find-by-primary-key&gt; element.
+ *
+ * @see <a href="https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{%3Cfindbyprimarykey%3E}}">Mini-language Reference</a>
  */
 public final class FindByPrimaryKey extends MethodOperation {
 
@@ -92,7 +94,7 @@ public final class FindByPrimaryKey exte
         Collection<String> fieldsToSelectList = fieldsToSelectListFma.get(methodContext.getEnvMap());
         try {
             if (fieldsToSelectList != null) {
-                valueFma.put(methodContext.getEnvMap(), delegator.findByPrimaryKeyPartial(delegator.makePK(entityName, inMap), UtilMisc.makeSetWritable(fieldsToSelectList)));
+                valueFma.put(methodContext.getEnvMap(), delegator.findByPrimaryKeyPartial(delegator.makePK(entityName, inMap), UtilMisc.toSet(fieldsToSelectList)));
             } else {
                 valueFma.put(methodContext.getEnvMap(), delegator.findOne(entityName, inMap, useCache));
             }

Modified: ofbiz/branches/jackrabbit20120501/framework/service/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/service/entitydef/entitymodel.xml?rev=1355450&r1=1355449&r2=1355450&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/service/entitydef/entitymodel.xml (original)
+++ ofbiz/branches/jackrabbit20120501/framework/service/entitydef/entitymodel.xml Fri Jun 29 15:44:16 2012
@@ -51,6 +51,7 @@ under the License.
         <field name="serviceName" type="name"></field>
         <field name="loaderName" type="name"></field>
         <field name="maxRetry" type="numeric"></field>
+        <field name="currentRetryCount" type="numeric"></field>
         <field name="authUserLoginId" type="id-vlong"></field>
         <field name="runAsUser" type="id-vlong"></field>
         <field name="runtimeDataId" type="id"></field>
@@ -62,6 +63,7 @@ under the License.
         <field name="startDateTime" type="date-time"></field>
         <field name="finishDateTime" type="date-time"></field>
         <field name="cancelDateTime" type="date-time"></field>
+        <field name="jobResult" type="value"></field>
         <prim-key field="jobId"/>
         <relation type="one" fk-name="JOB_SNDBX_RECINFO" rel-entity-name="RecurrenceInfo">
             <key-map field-name="recurrenceInfoId"/>

Modified: ofbiz/branches/jackrabbit20120501/framework/service/src/org/ofbiz/service/ServiceDispatcher.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/service/src/org/ofbiz/service/ServiceDispatcher.java?rev=1355450&r1=1355449&r2=1355450&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/service/src/org/ofbiz/service/ServiceDispatcher.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/service/src/org/ofbiz/service/ServiceDispatcher.java Fri Jun 29 15:44:16 2012
@@ -1080,15 +1080,6 @@ public class ServiceDispatcher {
         ServiceDispatcher.enableJMS = enable;
     }
 
-
-    /**
-     * Get Enabled/Disabled JMS listeners status
-     * @return boolean true is JMS listeners are enabled
-     */
-    public static boolean getEnableJMS() {
-        return ServiceDispatcher.enableJMS;
-    }
-
     /**
      * Enables/Disables the startup services globally
      * (this will not effect any dispatchers already running)

Modified: ofbiz/branches/jackrabbit20120501/framework/service/src/org/ofbiz/service/ServiceUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/service/src/org/ofbiz/service/ServiceUtil.java?rev=1355450&r1=1355449&r2=1355450&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/service/src/org/ofbiz/service/ServiceUtil.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/service/src/org/ofbiz/service/ServiceUtil.java Fri Jun 29 15:44:16 2012
@@ -184,6 +184,9 @@ public class ServiceUtil {
      *<b>security check</b>: userLogin partyId must equal partyId, or must have [secEntity][secOperation] permission
      */
     public static String getPartyIdCheckSecurity(GenericValue userLogin, Security security, Map<String, ? extends Object> context, Map<String, Object> result, String secEntity, String secOperation) {
+        return getPartyIdCheckSecurity(userLogin, security, context, result, secEntity, secOperation, null, null);
+    }
+    public static String getPartyIdCheckSecurity(GenericValue userLogin, Security security, Map<String, ? extends Object> context, Map<String, Object> result, String secEntity, String secOperation, String adminSecEntity, String adminSecOperation) {
         String partyId = (String) context.get("partyId");
         Locale locale = getLocale(context);
         if (UtilValidate.isEmpty(partyId)) {
@@ -198,9 +201,9 @@ public class ServiceUtil {
             return partyId;
         }
 
-        // <b>security check</b>: userLogin partyId must equal partyId, or must have PARTYMGR_CREATE permission
+        // <b>security check</b>: userLogin partyId must equal partyId, or must have either of the two permissions
         if (!partyId.equals(userLogin.getString("partyId"))) {
-            if (!security.hasEntityPermission(secEntity, secOperation, userLogin)) {
+            if (!security.hasEntityPermission(secEntity, secOperation, userLogin) && !(adminSecEntity != null && adminSecOperation != null && security.hasEntityPermission(adminSecEntity, adminSecOperation, userLogin))) {
                 result.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_ERROR);
                 String errMsg = UtilProperties.getMessage(ServiceUtil.resource, "serviceUtil.no_permission_to_operation", locale) + ".";
                 result.put(ModelService.ERROR_MESSAGE, errMsg);

Modified: ofbiz/branches/jackrabbit20120501/framework/service/src/org/ofbiz/service/job/GenericServiceJob.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/service/src/org/ofbiz/service/job/GenericServiceJob.java?rev=1355450&r1=1355449&r2=1355450&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/service/src/org/ofbiz/service/job/GenericServiceJob.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/service/src/org/ofbiz/service/job/GenericServiceJob.java Fri Jun 29 15:44:16 2012
@@ -24,7 +24,7 @@ import org.ofbiz.base.util.Debug;
 import org.ofbiz.service.DispatchContext;
 import org.ofbiz.service.GenericRequester;
 import org.ofbiz.service.LocalDispatcher;
-import org.ofbiz.service.ModelService;
+import org.ofbiz.service.ServiceUtil;
 
 /**
  * Generic Service Job - A generic async-service Job.
@@ -64,17 +64,16 @@ public class GenericServiceJob extends A
     public void exec() throws InvalidJobException {
         init();
 
+        Map<String, Object> result = null;
         // no transaction is necessary since runSync handles this
         try {
             // get the dispatcher and invoke the service via runSync -- will run all ECAs
             LocalDispatcher dispatcher = dctx.getDispatcher();
-            Map<String, Object> result = dispatcher.runSync(getServiceName(), getContext());
+            result = dispatcher.runSync(getServiceName(), getContext());
 
             // check for a failure
-            boolean isError = ModelService.RESPOND_ERROR.equals(result.get(ModelService.RESPONSE_MESSAGE));
-            if (isError) {
-                 String errorMessage = (String) result.get(ModelService.ERROR_MESSAGE);
-                 this.failed(new Exception(errorMessage));
+            if (ServiceUtil.isError(result)) {
+                 this.failed(new Exception(ServiceUtil.getErrorMessage(result)));
             }
 
             if (requester != null) {
@@ -92,7 +91,7 @@ public class GenericServiceJob extends A
         }
 
         // call the finish method
-        this.finish();
+        this.finish(result);
     }
 
     /**
@@ -105,7 +104,7 @@ public class GenericServiceJob extends A
     /**
      * Method is called after the service has finished.
      */
-    protected void finish() throws InvalidJobException {
+    protected void finish(Map<String, Object> result) throws InvalidJobException {
         if (Debug.verboseOn()) Debug.logVerbose("Async-Service finished.", module);
         runtime = 0;
     }

Modified: ofbiz/branches/jackrabbit20120501/framework/service/src/org/ofbiz/service/job/JobManager.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/service/src/org/ofbiz/service/job/JobManager.java?rev=1355450&r1=1355449&r2=1355450&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/service/src/org/ofbiz/service/job/JobManager.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/service/src/org/ofbiz/service/job/JobManager.java Fri Jun 29 15:44:16 2012
@@ -410,6 +410,7 @@ public class JobManager {
 
         // set the max retry
         jFields.put("maxRetry", Long.valueOf(maxRetry));
+        jFields.put("currentRetryCount", new Long(0));
 
         // create the value and store
         GenericValue jobV;

Modified: ofbiz/branches/jackrabbit20120501/framework/service/src/org/ofbiz/service/job/PersistedServiceJob.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/service/src/org/ofbiz/service/job/PersistedServiceJob.java?rev=1355450&r1=1355449&r2=1355450&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/service/src/org/ofbiz/service/job/PersistedServiceJob.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/service/src/org/ofbiz/service/job/PersistedServiceJob.java Fri Jun 29 15:44:16 2012
@@ -49,6 +49,8 @@ import org.ofbiz.service.calendar.Recurr
 import org.ofbiz.service.config.ServiceConfigUtil;
 import org.xml.sax.SAXException;
 
+import org.apache.commons.lang.StringUtils;
+
 /**
  * Entity Service Job - Store => Schedule => Run
  */
@@ -61,6 +63,7 @@ public class PersistedServiceJob extends
     private Timestamp storedDate = null;
     private long nextRecurrence = -1;
     private long maxRetry = -1;
+    private long currentRetryCount = 0;
     private boolean warningLogged = false;
 
     /**
@@ -77,7 +80,14 @@ public class PersistedServiceJob extends
         this.storedDate = jobValue.getTimestamp("runTime");
         this.runtime = storedDate.getTime();
         this.maxRetry = jobValue.get("maxRetry") != null ? jobValue.getLong("maxRetry").longValue() : -1;
-        
+        Long retryCount = jobValue.getLong("currentRetryCount");
+        if (retryCount != null) {
+            this.currentRetryCount = retryCount.longValue();
+        } else {
+            // backward compatibility
+            this.currentRetryCount = PersistedServiceJob.getRetries(jobValue, this.delegator);
+        }
+
         // Debug.logInfo("=============== New PersistedServiceJob, delegator from dctx is [" + dctx.getDelegator().getDelegatorName() + "] and delegator from jobValue is [" + jobValue.getDelegator().getDelegatorName() + "]", module);
     }
 
@@ -171,7 +181,7 @@ public class PersistedServiceJob extends
                 }
                 Calendar next = expr.next(Calendar.getInstance());
                 if (next != null) {
-                    createRecurrence(job, next.getTimeInMillis());
+                    createRecurrence(job, next.getTimeInMillis(), false);
                 }
             }
         } catch (GenericEntityException e) {
@@ -180,7 +190,7 @@ public class PersistedServiceJob extends
         if (Debug.infoOn()) Debug.logInfo("Job  [" + getJobName() + "] Id ["  + getJobId() + "] -- Next runtime: " + new Date(nextRecurrence), module);
     }
 
-    private void createRecurrence(GenericValue job, long next) throws GenericEntityException {
+    private void createRecurrence(GenericValue job, long next, boolean isRetryOnFailure) throws GenericEntityException {
         if (Debug.verboseOn()) Debug.logVerbose("Next runtime returned: " + next, module);
 
         if (next > runtime) {
@@ -196,6 +206,11 @@ public class PersistedServiceJob extends
             newJob.set("startDateTime", null);
             newJob.set("runByInstanceId", null);
             newJob.set("runTime", new java.sql.Timestamp(next));
+            if (isRetryOnFailure) {
+                newJob.set("currentRetryCount", new Long(currentRetryCount + 1));
+            } else {
+                newJob.set("currentRetryCount", new Long(0));
+            }
             nextRecurrence = next;
             delegator.createSetNextSeqId(newJob);
             if (Debug.verboseOn()) Debug.logVerbose("Created next job entry: " + newJob, module);
@@ -206,8 +221,8 @@ public class PersistedServiceJob extends
      * @see org.ofbiz.service.job.GenericServiceJob#finish()
      */
     @Override
-    protected void finish() throws InvalidJobException {
-        super.finish();
+    protected void finish(Map<String, Object> result) throws InvalidJobException {
+        super.finish(result);
 
         // set the finish date
         GenericValue job = getJob();
@@ -216,6 +231,15 @@ public class PersistedServiceJob extends
             job.set("statusId", "SERVICE_FINISHED");
         }
         job.set("finishDateTime", UtilDateTime.nowTimestamp());
+        String jobResult = null;
+        if (ServiceUtil.isError(result)) {
+            jobResult = StringUtils.substring(ServiceUtil.getErrorMessage(result), 0, 255);
+        } else {
+            jobResult = StringUtils.substring(ServiceUtil.makeSuccessMessage(result, "", "", "", ""), 0, 255);
+        }
+        if (UtilValidate.isNotEmpty(jobResult)) {
+            job.set("jobResult", jobResult);
+        }
         try {
             job.store();
         } catch (GenericEntityException e) {
@@ -240,7 +264,7 @@ public class PersistedServiceJob extends
                 cal.add(Calendar.MINUTE, ServiceConfigUtil.getFailedRetryMin());
                 long next = cal.getTimeInMillis();
                 try {
-                    createRecurrence(job, next);
+                    createRecurrence(job, next, true);
                 } catch (GenericEntityException gee) {
                     Debug.logError(gee, "ERROR: Unable to re-schedule job [" + getJobId() + "] to re-run : " + job, module);
                 }
@@ -252,6 +276,7 @@ public class PersistedServiceJob extends
         // set the failed status
         job.set("statusId", "SERVICE_FAILED");
         job.set("finishDateTime", UtilDateTime.nowTimestamp());
+        job.set("jobResult", StringUtils.substring(t.getMessage(), 0, 255));
         try {
             job.store();
         } catch (GenericEntityException e) {
@@ -327,8 +352,7 @@ public class PersistedServiceJob extends
     }
 
     // returns the number of current retries
-    private long getRetries() throws InvalidJobException {
-        GenericValue job = this.getJob();
+    private static long getRetries(GenericValue job, Delegator delegator) {
         String pJobId = job.getString("parentJobId");
         if (pJobId == null) {
             return 0;
@@ -349,9 +373,6 @@ public class PersistedServiceJob extends
         if (maxRetry == -1) {
             return true;
         }
-        if (this.getRetries() < maxRetry) {
-            return true;
-        }
-        return false;
+        return currentRetryCount < maxRetry;
     }
 }

Modified: ofbiz/branches/jackrabbit20120501/framework/testtools/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/testtools/build.xml?rev=1355450&r1=1355449&r2=1355450&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/testtools/build.xml (original)
+++ ofbiz/branches/jackrabbit20120501/framework/testtools/build.xml Fri Jun 29 15:44:16 2012
@@ -32,7 +32,6 @@ under the License.
     <path id="local.class.path">
         <fileset dir="${lib.dir}" includes="*.jar"/>
         <fileset dir="../base/lib" includes="*.jar"/>
-        <fileset dir="../base/lib/scripting" includes="*.jar"/>
         <fileset dir="../base/lib/j2eespecs" includes="*.jar"/>
         <fileset dir="../base/lib/commons" includes="*.jar"/>
         <fileset dir="../base/build/lib" includes="*.jar"/>
@@ -42,59 +41,10 @@ under the License.
         <fileset dir="../service/lib" includes="*.jar"/>
         <fileset dir="../service/build/lib" includes="*.jar"/>
         <fileset dir="../minilang/build/lib" includes="*.jar"/>
-        <fileset dir="../webapp/lib" includes="*.jar"/>
     </path>
     
     <path id="runtime.class.path">
         <fileset dir="${build.dir}/lib" includes="*.jar"/>
     </path>    
     
-    <target name="init">
-        
-        <property name="lib.dir" value="lib"/>
-        <property name="selenium.lib.dir" value="${lib.dir}"/>
-    </target>
-
-    <target name="run-seleniumxml" depends="init, jar" description="Runs the selenium xml test cases">
-        <java classname="org.ofbiz.testtools.seleniumxml.SeleniumXml" fork="true">
-            <jvmarg value="-Dselenium.config=config/seleniumXml.properties"/>
-            <arg value="testdef/seleniumxml/example/example_testsuite.xml"/>
-            <classpath>
-                   <path refid="runtime.class.path"/>
-                <path refid="local.class.path"/>
-              </classpath>
-        </java>
-    </target>
-
-    <target name="run-seleniumserver" depends="init, jar" description="Runs the selenium RC server">
-        <java jar="../../framework/testtools/lib/selenium-server.jar" fork="true">
-            <!-- arg value="-timeout 240"/ -->
-            <classpath>
-                   <path refid="runtime.class.path"/>
-                <path refid="local.class.path"/>
-              </classpath>
-            <arg value="-timeout"/>
-            <arg value="240"/>
-            <arg value="-firefoxProfileTemplate"/>
-            <arg value="./config/firefox_profile"/>
-        </java>
-    </target>
-    
-    <target name="install-seleniumxml" depends="init" description="Download the selenium files">
-        <!--
-            Quick way to download and extract the selenium-server.jar
-            If someone has a better way to do the same, please suggest !
-        -->
-        <get src="http://selenium.googlecode.com/files/selenium-remote-control-1.0.3.zip"
-             dest="${selenium.lib.dir}/selenium-remote-control-1.0.3.zip" usetimestamp="true" verbose="true"/>
-        <unzip src="${selenium.lib.dir}/selenium-remote-control-1.0.3.zip"
-                dest="${selenium.lib.dir}">
-            <patternset>
-                <include name="selenium-server-1.0.3/selenium-server.jar"/>
-            </patternset>
-        </unzip>
-        <move file="${selenium.lib.dir}/selenium-server-1.0.3/selenium-server.jar" todir="${selenium.lib.dir}"/>
-        <delete dir="${selenium.lib.dir}/selenium-server-1.0.3"/>
-        <delete file="${selenium.lib.dir}/selenium-remote-control-1.0.3.zip"/>
-    </target>
 </project>

Modified: ofbiz/branches/jackrabbit20120501/framework/testtools/ofbiz-component.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/testtools/ofbiz-component.xml?rev=1355450&r1=1355449&r2=1355450&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/testtools/ofbiz-component.xml (original)
+++ ofbiz/branches/jackrabbit20120501/framework/testtools/ofbiz-component.xml Fri Jun 29 15:44:16 2012
@@ -23,8 +23,7 @@
     xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
     <!-- define resource loaders; most common is to use the component resource loader -->
     <resource-loader name="main" type="component"/>
-    <classpath type="dir" location="config"/>
-    
+
     <!-- place the config directory on the classpath to access configuration files -->
     <classpath type="dir" location="dtd"/>
     
@@ -32,9 +31,6 @@
     <classpath type="jar" location="lib/*"/>
     <classpath type="jar" location="build/lib/*"/>
     
-    <!-- entitydef -->
-    <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel.xml"/>
-    
     <!-- service resources: model(s), eca(s) and group definitions -->
     <service-resource type="model" loader="main" location="servicedef/services.xml"/>
     

Modified: ofbiz/branches/jackrabbit20120501/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java?rev=1355450&r1=1355449&r2=1355450&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java Fri Jun 29 15:44:16 2012
@@ -305,7 +305,7 @@ public class ContextFilter implements Fi
                     config.getServletContext().setAttribute("delegator", delegator);
 
                     // clear web context objects
-                    config.getServletContext().setAttribute("authorization", null);
+                    config.getServletContext().setAttribute("authz", null);
                     config.getServletContext().setAttribute("security", null);
                     config.getServletContext().setAttribute("dispatcher", null);
 
@@ -317,10 +317,10 @@ public class ContextFilter implements Fi
                     LocalDispatcher dispatcher = getDispatcher(config.getServletContext());
 
                     // set web context objects
-                    httpRequest.getSession().setAttribute("dispatcher", dispatcher);
-                    httpRequest.getSession().setAttribute("security", security);
+                    request.setAttribute("dispatcher", dispatcher);
+                    request.setAttribute("security", security);
                     
-                    httpRequest.setAttribute("tenantId", tenantId);
+                    request.setAttribute("tenantId", tenantId);
                 }
 
                 // NOTE DEJ20101130: do NOT always put the delegator name in the user's session because the user may
@@ -420,7 +420,7 @@ public class ContextFilter implements Fi
     }
 
     protected Authorization getAuthz() {
-        Authorization authz = (Authorization) config.getServletContext().getAttribute("authorization");
+        Authorization authz = (Authorization) config.getServletContext().getAttribute("authz");
         if (authz == null) {
             Delegator delegator = (Delegator) config.getServletContext().getAttribute("delegator");
 

Modified: ofbiz/branches/jackrabbit20120501/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java?rev=1355450&r1=1355449&r2=1355450&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java Fri Jun 29 15:44:16 2012
@@ -39,18 +39,16 @@ import javolution.util.FastList;
 import javolution.util.FastMap;
 
 import org.ofbiz.base.component.ComponentConfig;
-import org.ofbiz.base.container.ContainerConfig;
-import org.ofbiz.base.container.ContainerException;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.GeneralException;
 import org.ofbiz.base.util.KeyStoreUtil;
 import org.ofbiz.base.util.StringUtil;
+import org.ofbiz.base.util.StringUtil.StringWrapper;
 import org.ofbiz.base.util.UtilFormatOut;
 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.StringUtil.StringWrapper;
 import org.ofbiz.entity.Delegator;
 import org.ofbiz.entity.DelegatorFactory;
 import org.ofbiz.entity.GenericEntityException;
@@ -447,7 +445,7 @@ public class LoginWorker {
 
             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);
+                setWebContextObjects(request, response, delegator, dispatcher);
             }
 
             // check to see if a password change is required for the user
@@ -477,47 +475,28 @@ public class LoginWorker {
         }
     }
 
-    /*         persistSerialized is set at false in the context of a cluster when using (at least) DeltaManager.
-            Because we have no easy ways to set DeltaManager.pathname to null from OFBiz
-           So persistSerialized is set to true when login out. This prevent a NPE due to non serialized objects put in session*/
-    private static void setWebContextObjects(HttpServletRequest request, HttpServletResponse response, Delegator delegator, LocalDispatcher dispatcher, Boolean persistSerialized) {
+    private static void setWebContextObjects(HttpServletRequest request, HttpServletResponse response, Delegator delegator, LocalDispatcher dispatcher) {
         HttpSession session = request.getSession();
+        // NOTE: we do NOT want to set this in the servletContext, only in the request and session
+        // We also need to setup the security and authz objects since they are dependent on the delegator
+        Security security = null;
+        try {
+            security = SecurityFactory.getInstance(delegator);
+        } catch (SecurityConfigurationException e) {
+            Debug.logError(e, module);
+        }
+        Authorization authz = null;
+        try {
+            authz = AuthorizationFactory.getInstance(delegator);
+        } catch (SecurityConfigurationException e) {
+            Debug.logError(e, module);
+        }
 
-        // NOTE: we do NOT want to set this in the servletContet, only in the request and session
         session.setAttribute("delegatorName", delegator.getDelegatorName());
-
         request.setAttribute("delegator", delegator);
-        if (!persistSerialized) {
-            session.setAttribute("delegator", null);
-        } else {
-            session.setAttribute("delegator", delegator);
-        }
-
         request.setAttribute("dispatcher", dispatcher);
-        if (!persistSerialized) {
-            session.setAttribute("dispatcher", null);
-        } else {
-            session.setAttribute("dispatcher", dispatcher);
-        }
-
-        if (persistSerialized) {
-            // we also need to setup the security and authz objects since they are dependent on the delegator
-            try {
-                Security security = SecurityFactory.getInstance(delegator);
-                request.setAttribute("security", security);
-                session.setAttribute("security", security);
-            } catch (SecurityConfigurationException e) {
-                Debug.logError(e, module);
-            }
-
-            try {
-                Authorization authz = AuthorizationFactory.getInstance(delegator);
-                request.setAttribute("authz", authz);
-                session.setAttribute("authz", authz);
-            } catch (SecurityConfigurationException e) {
-                Debug.logError(e, module);
-            }
-        }
+        request.setAttribute("security", security);
+        request.setAttribute("authz", authz);
 
         // get rid of the visit info since it was pointing to the previous database, and get a new one
         session.removeAttribute("visitor");
@@ -652,22 +631,7 @@ public class LoginWorker {
 
             delegator = DelegatorFactory.getDelegator(delegatorName);
             LocalDispatcher dispatcher = ContextFilter.makeWebappDispatcher(session.getServletContext(), delegator);
-            // get the container configuration
-            String ofbizHome = System.getProperty("ofbiz.home");
-            String configFile = ofbizHome + "/framework/base/config/ofbiz-containers.xml";
-            ContainerConfig.Container cc = null;
-            String mgrClassName = null;
-            try {
-                cc = ContainerConfig.getContainer("catalina-container", configFile);
-                mgrClassName = ContainerConfig.getPropertyValue(cc, "manager-class", "");
-            } catch (ContainerException e) {
-                Debug.logError(e, "No catalina-container configuration found in container config!");
-            }
-            if ("org.apache.catalina.ha.session.DeltaManager".equals(mgrClassName)) {
-                setWebContextObjects(request, response, delegator, dispatcher, false);
-            } else {
-                setWebContextObjects(request, response, delegator, dispatcher, true);
-            }
+            setWebContextObjects(request, response, delegator, dispatcher);
         }
 
         // DON'T save the cart, causes too many problems: if (shoppingCart != null) session.setAttribute("shoppingCart", new WebShoppingCart(shoppingCart, session));
@@ -981,7 +945,7 @@ public class LoginWorker {
             if (!oldDelegatorName.equals(userLogin.getDelegator().getDelegatorName())) {
                 delegator = DelegatorFactory.getDelegator(userLogin.getDelegator().getDelegatorName());
                 dispatcher = ContextFilter.makeWebappDispatcher(servletContext, delegator);
-                setWebContextObjects(request, response, delegator, dispatcher, true);
+                setWebContextObjects(request, response, delegator, dispatcher);
             }
             // found userLogin, do the external login...
 

Modified: ofbiz/branches/jackrabbit20120501/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java?rev=1355450&r1=1355449&r2=1355450&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java Fri Jun 29 15:44:16 2012
@@ -97,96 +97,6 @@ public class CoreEvents {
     }
 
     /**
-     * Change delegator event. Changes the delegator for the current session
-     * @param request HttpServletRequest
-     * @param response HttpServletResponse
-     * @return Response code string
-     */
-    public static String changeDelegator(HttpServletRequest request, HttpServletResponse response) {
-        String delegatorName = request.getParameter("delegator");
-        Authorization authz = (Authorization) request.getAttribute("authz");
-        Locale locale = UtilHttp.getLocale(request);
-
-        if (!authz.hasPermission(request.getSession(), "ENTITY_MAINT", null)) {
-            String errMsg = UtilProperties.getMessage(CoreEvents.err_resource, "coreEvents.not_authorized_use_fct", locale);
-            request.setAttribute("_ERROR_MESSAGE_", errMsg);
-            return "error";
-        }
-        if (delegatorName == null) {
-            String errMsg = UtilProperties.getMessage(CoreEvents.err_resource, "coreEvents.delegator_not_passed", locale);
-            request.setAttribute("_ERROR_MESSAGE_", errMsg);
-            return "error";
-        }
-
-        Delegator delegator = DelegatorFactory.getDelegator(delegatorName);
-
-        if (delegator == null) {
-            String errMsg = UtilProperties.getMessage(CoreEvents.err_resource, "coreEvents.no_delegator_name_defined", locale);
-            request.setAttribute("_ERROR_MESSAGE_", errMsg);
-            return "error";
-        }
-
-        // now change the dispatcher to use this delegator
-        LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
-        DispatchContext dctx = dispatcher.getDispatchContext();
-        String dispatcherName = dispatcher.getName();
-
-        if (dispatcherName == null) {
-            String errMsg = UtilProperties.getMessage(CoreEvents.err_resource, "coreEvents.dispatcher_name_null", locale);
-            request.setAttribute("_ERROR_MESSAGE_", errMsg);
-            return "error";
-        }
-        if (dctx == null) {
-            String errMsg = UtilProperties.getMessage(CoreEvents.err_resource, "coreEvents.dispatcher_context_null", locale);
-            request.setAttribute("_ERROR_MESSAGE_", errMsg);
-            return "error";
-        }
-
-        dispatcher = GenericDispatcher.getLocalDispatcher(dispatcherName, delegator);
-
-        request.getSession().setAttribute("delegator", delegator);
-        request.getSession().setAttribute("dispatcher", dispatcher);
-
-        return "success";
-    }
-
-    /**
-     * Change dispatcher event. Changes the dispatch for the current session
-     * @param request HttpServletRequest
-     * @param response HttpServletResponse
-     * @return Response code string
-     */
-    public static String changeDispatcher(HttpServletRequest request, HttpServletResponse response) {
-        String dispatcherName = request.getParameter("dispatcher");
-        Authorization authz = (Authorization) request.getAttribute("authz");
-        Locale locale = UtilHttp.getLocale(request);
-
-        if (!authz.hasPermission(request.getSession(), "ENTITY_MAINT", null)) {
-            String errMsg = UtilProperties.getMessage(CoreEvents.err_resource, "coreEvents.not_authorized_use_fct", locale);
-            request.setAttribute("_ERROR_MESSAGE_", errMsg);
-            return "error";
-        }
-        if (dispatcherName == null) {
-            String errMsg = UtilProperties.getMessage(CoreEvents.err_resource, "coreEvents.dispatcher_not_passed", locale);
-            request.setAttribute("_ERROR_MESSAGE_", errMsg);
-            return "error";
-        }
-
-        Delegator delegator = (Delegator) request.getAttribute("delegator");
-        ServiceDispatcher sd = ServiceDispatcher.getInstance(dispatcherName, delegator);
-
-        if (sd == null) {
-            String errMsg = UtilProperties.getMessage(CoreEvents.err_resource, "coreEvents.no_dispachter_name_registered", locale);
-            request.setAttribute("_ERROR_MESSAGE_", errMsg);
-            return "error";
-        }
-        LocalDispatcher dispatcher = sd.getLocalContext(dispatcherName).getDispatcher();
-
-        request.getSession().setAttribute("dispatcher", dispatcher);
-        return "success";
-    }
-
-    /**
      * Schedule a service for a specific time or recurrence
      *  Request Parameters which are used for this service:
      *

Modified: ofbiz/branches/jackrabbit20120501/framework/webtools/data/helpdata/HELP_WEBTOOLS.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/webtools/data/helpdata/HELP_WEBTOOLS.xml?rev=1355450&r1=1355449&r2=1355450&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/webtools/data/helpdata/HELP_WEBTOOLS.xml (original)
+++ ofbiz/branches/jackrabbit20120501/framework/webtools/data/helpdata/HELP_WEBTOOLS.xml Fri Jun 29 15:44:16 2012
@@ -19,5 +19,4 @@ License.
     xmlns="http://docbook.org/ns/docbook">
     <title>The Webtools Introduction.</title>
     <xi:include href="HELP_WEBTOOLS_main.xml" />
-    <xi:include href="../../../testtools/data/helpdata/HELP_WEBTOOLS_selenium.xml" />
 </section>
\ No newline at end of file

Modified: ofbiz/branches/jackrabbit20120501/framework/webtools/data/helpdata/HELP_WEBTOOLS_main.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/webtools/data/helpdata/HELP_WEBTOOLS_main.xml?rev=1355450&r1=1355449&r2=1355450&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/webtools/data/helpdata/HELP_WEBTOOLS_main.xml (original)
+++ ofbiz/branches/jackrabbit20120501/framework/webtools/data/helpdata/HELP_WEBTOOLS_main.xml Fri Jun 29 15:44:16 2012
@@ -47,8 +47,5 @@ License.
       <listitem>
         <para>The <link xl:href="">Portal Page Admin.</link> section is used to browse and edit all Portal Pages defined in the system.</para>
       </listitem>
-      <listitem>
-        <para>The <link xl:href="showHelp?helpTopic=WEBTOOLS_selenium">Tests</link> section is used to run system tests.</para>
-      </listitem>
     </itemizedlist>
 </section>