svn commit: r1305581 [26/36] - in /ofbiz/branches/20111205EmailHandling: ./ applications/accounting/config/ applications/accounting/data/ applications/accounting/entitydef/ applications/accounting/script/org/ofbiz/accounting/finaccount/ applications/ac...

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

svn commit: r1305581 [26/36] - in /ofbiz/branches/20111205EmailHandling: ./ applications/accounting/config/ applications/accounting/data/ applications/accounting/entitydef/ applications/accounting/script/org/ofbiz/accounting/finaccount/ applications/ac...

erwan
Modified: ofbiz/branches/20111205EmailHandling/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java (original)
+++ ofbiz/branches/20111205EmailHandling/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java Mon Mar 26 20:56:02 2012
@@ -874,7 +874,7 @@ public class GenericDAO {
             if (addParens) havingString.append(")");
         }
         if (UtilValidate.isNotEmpty(viewEntityCondHavingString)) {
-            if (havingString.length() > 0) havingString.append(" AND ");
+            if (UtilValidate.isNotEmpty(entityCondHavingString)) havingString.append(" AND ");
             boolean addParens = viewEntityCondHavingString.charAt(0) != '(';
             if (addParens) havingString.append("(");
             havingString.append(viewEntityCondHavingString);

Modified: ofbiz/branches/20111205EmailHandling/framework/entity/src/org/ofbiz/entity/jdbc/JdbcValueHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/entity/src/org/ofbiz/entity/jdbc/JdbcValueHandler.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/entity/src/org/ofbiz/entity/jdbc/JdbcValueHandler.java (original)
+++ ofbiz/branches/20111205EmailHandling/framework/entity/src/org/ofbiz/entity/jdbc/JdbcValueHandler.java Mon Mar 26 20:56:02 2012
@@ -25,6 +25,7 @@ import java.io.InputStream;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.io.Reader;
+import java.nio.ByteBuffer;
 import java.sql.Blob;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
@@ -324,16 +325,20 @@ public abstract class JdbcValueHandler<T
         }
         @Override
         protected void castAndSetValue(PreparedStatement ps, int parameterIndex, Object obj) throws SQLException {
-            try {
-                // FIXME: This is here for backwards compatibility. Client code
-                // that uses a Blob java-type for a byte array should use a
-                // byte[] java-type instead.
-                byte[] bytes = (byte[]) obj;
-                Debug.logWarning("Blob java-type used for byte array. Use byte[] java-type instead.", module);
-                ps.setBytes(parameterIndex, bytes);
-                return;
-            } catch (ClassCastException e) {}
-            ps.setBlob(parameterIndex, (Blob) obj);
+            // FIXME: This is here for backwards compatibility. Client code
+            // that uses a Blob java-type for a byte array should use a
+            // byte[] java-type instead.
+            if (obj instanceof Blob) {
+                ps.setBlob(parameterIndex, (Blob)obj);
+            } else if (obj instanceof byte[]) {
+                ps.setBytes(parameterIndex, (byte[]) obj);
+            } else if (obj instanceof ByteBuffer) {
+                ps.setBytes(parameterIndex, ((ByteBuffer)obj).array());
+            } else {
+                Debug.logError("JdbcValueHandler.castAndSetValue(): Unexpected type found. type=" + obj.getClass().getName(), module);
+                throw new IllegalArgumentException(obj.getClass().getName());
+            }
+            return;
         }
         @Override
         public Object getValue(ResultSet rs, int columnIndex) throws SQLException {

Modified: ofbiz/branches/20111205EmailHandling/framework/entity/src/org/ofbiz/entity/serialize/XmlSerializer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/entity/src/org/ofbiz/entity/serialize/XmlSerializer.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/entity/src/org/ofbiz/entity/serialize/XmlSerializer.java (original)
+++ ofbiz/branches/20111205EmailHandling/framework/entity/src/org/ofbiz/entity/serialize/XmlSerializer.java Mon Mar 26 20:56:02 2012
@@ -22,6 +22,7 @@ import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.Serializable;
 import java.lang.ref.WeakReference;
+import java.math.BigDecimal;
 import java.text.DateFormat;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
@@ -130,7 +131,7 @@ public class XmlSerializer {
     public static Element serializeSingle(Object object, Document document) throws SerializeException {
         if (document == null) return null;
 
-        if (object == null) return document.createElement("null");
+        if (object == null) return makeElement("null", object, document);
 
         // - Standard Objects -
         if (object instanceof String) {
@@ -147,9 +148,13 @@ public class XmlSerializer {
             return makeElement("std-Boolean", object, document);
         } else if (object instanceof Locale) {
             return makeElement("std-Locale", object, document);
+        } else if (object instanceof BigDecimal) {
+            String stringValue = ((BigDecimal) object).setScale(10, BigDecimal.ROUND_HALF_UP).toString();            
+            return makeElement("std-BigDecimal", stringValue, document);
             // - SQL Objects -
         } else if (object instanceof java.sql.Timestamp) {
-            return makeElement("sql-Timestamp", object, document);
+            String stringValue = object.toString().replace(' ', 'T');
+            return makeElement("sql-Timestamp", stringValue, document);
         } else if (object instanceof java.sql.Date) {
             return makeElement("sql-Date", object, document);
         } else if (object instanceof java.sql.Time) {
@@ -268,7 +273,15 @@ public class XmlSerializer {
     }
 
     public static Element makeElement(String elementName, Object value, Document document) {
-        if (value == null) return document.createElement("null");
+        if (value == null) {
+            Element element = document.createElement("null");
+            element.setAttribute("xsi:nil", "true");
+            // I tried to put the schema in the envelope header (in createAndSendSOAPResponse)
+            // resEnv.declareNamespace("http://www.w3.org/2001/XMLSchema-instance", null);
+            // But it gets prefixed and that does not work. So adding in each instance
+            element.setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
+            return element;
+        }
         Element element = document.createElement(elementName);
 
         element.setAttribute("value", value.toString());
@@ -296,6 +309,9 @@ public class XmlSerializer {
             } else if ("std-Double".equals(tagName)) {
                 String valStr = element.getAttribute("value");
                 return Double.valueOf(valStr);
+            } else if ("std-BigDecimal".equals(tagName)) {
+                String valStr = element.getAttribute("value");
+                return new BigDecimal(valStr);
             } else if ("std-Boolean".equals(tagName)) {
                 String valStr = element.getAttribute("value");
                 return Boolean.valueOf(valStr);

Modified: ofbiz/branches/20111205EmailHandling/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java (original)
+++ ofbiz/branches/20111205EmailHandling/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java Mon Mar 26 20:56:02 2012
@@ -53,6 +53,7 @@ import org.ofbiz.base.util.UtilDateTime;
 import org.ofbiz.base.util.UtilGenerics;
 import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.entity.GenericEntityException;
+import org.ofbiz.entity.config.EntityConfigUtil;
 
 /**
  * <p>Transaction Utility to help with some common transaction tasks
@@ -62,7 +63,7 @@ public class TransactionUtil implements
     // Debug module name
     public static final String module = TransactionUtil.class.getName();
     public static Map<Xid, DebugXaResource> debugResMap = Collections.<Xid, DebugXaResource>synchronizedMap(new HashMap<Xid, DebugXaResource>());
-    public static boolean debugResources = true;
+    public static boolean debugResources = EntityConfigUtil.isDebugXAResource();
 
     private static ThreadLocal<List<Transaction>> suspendedTxStack = new ThreadLocal<List<Transaction>>();
     private static ThreadLocal<List<Exception>> suspendedTxLocationStack = new ThreadLocal<List<Exception>>();
@@ -194,7 +195,7 @@ public class TransactionUtil implements
         }
     }
 
-    protected static synchronized void internalBegin(UserTransaction ut, int timeout) throws SystemException, NotSupportedException {
+    protected static void internalBegin(UserTransaction ut, int timeout) throws SystemException, NotSupportedException {
         // set the timeout for THIS transaction
         if (timeout > 0) {
             ut.setTransactionTimeout(timeout);

Modified: ofbiz/branches/20111205EmailHandling/framework/entity/testdef/entitytests.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/entity/testdef/entitytests.xml?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/entity/testdef/entitytests.xml (original)
+++ ofbiz/branches/20111205EmailHandling/framework/entity/testdef/entitytests.xml Mon Mar 26 20:56:02 2012
@@ -22,4 +22,7 @@ under the License.
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/test-suite.xsd">
     <test-case case-name="entity-tests"><junit-test-suite class-name="org.ofbiz.entity.test.EntityTestSuite"/></test-case>
+    <test-case case-name="entity-util-properties-tests">
+        <simple-method-test location="component://entity/script/org/ofbiz/entity/test/EntityUtilPropertiesTests.xml"/>
+    </test-case>
 </test-suite>

Modified: ofbiz/branches/20111205EmailHandling/framework/entityext/config/EntityExtUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/entityext/config/EntityExtUiLabels.xml?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/entityext/config/EntityExtUiLabels.xml (original)
+++ ofbiz/branches/20111205EmailHandling/framework/entityext/config/EntityExtUiLabels.xml Mon Mar 26 20:56:02 2012
@@ -21,82 +21,102 @@
 <resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <property key="EntityExtCannotDoEntitySyncPush">
         <value xml:lang="en">Cannot do Entity Sync Push because entitySyncId [] is set for Pull Only.</value>
+        <value xml:lang="fr">Impossible d'effectuer la synchro (push) avec un configuration en mode esclave seulement (pull only).</value>
         <value xml:lang="it">Non è possibile fare Entity Sync Push perchè entitySyncId [] è impostato in Pull Only.</value>
     </property>
     <property key="EntityExtCannotFindDelegator">
         <value xml:lang="en">Could not find delegator with specified name ${overrideDelegatorName}</value>
+        <value xml:lang="fr">Le delegateur avec le nom ${overrideDelegatorName} n'a pu être trouvé</value>
         <value xml:lang="it">Could not find delegator with specified name ${overrideDelegatorName}</value>
     </property>
     <property key="EntityExtEntitySyncXMLDocumentIsNotValid">
         <value xml:lang="en">EntitySync XML document ${fileName} is not valid!</value>
+        <value xml:lang="fr">L'EntitySync XML document ${fileName} n'est pas valide !</value>
         <value xml:lang="it">EntitySync XML documento ${fileName} non è valido!</value>
     </property>
     <property key="EntityExtErrorCallingRemotePull">
         <value xml:lang="en">Error calling remote pull and report EntitySync service with name: ${remotePullAndReportEntitySyncDataName}</value>
+        <value xml:lang="fr">Erreur lors de l'appel de l'esclave (remote pull) et de son rapport sur le service nommé : ${remotePullAndReportEntitySyncDataName}</value>
         <value xml:lang="it">Errore durante la chiamata del pull remoto e report EntitySync servizio con il nome: ${remotePullAndReportEntitySyncDataName}</value>
     </property>
     <property key="EntityExtErrorCallingService">
         <value xml:lang="en">Error calling service to store data locally</value>
+        <value xml:lang="fr">Erreur d'appel du service de mise à jour des données locales</value>
         <value xml:lang="it">Errore durante la chiamata del servizio di registrazione locale dei dati</value>
     </property>
     <property key="EntityExtErrorCleaningEntitySyncRemove">
         <value xml:lang="en">Error cleaning out EntitySyncRemove info: ${errorString}</value>
+        <value xml:lang="fr">Erreur lors du nettoyage des EntitySyncRemove, plus d'informations : ${errorString}</value>
         <value xml:lang="it">Error cleaning out EntitySyncRemove info: ${errorString}</value>
     </property>
     <property key="EntityExtErrorGettingListOfEntityInGroup">
         <value xml:lang="en">Error getting list of entities in group: ${errorString}</value>
+        <value xml:lang="fr">Erreur lors de la récupération des entités du group : ${errorString}</value>
         <value xml:lang="it">Errore ad ottenere la lista delle entità nel gruppo: ${errorString}</value>
     </property>
     <property key="EntityExtErrorUnwrappingRecords">
         <value xml:lang="en">Error unwrapping ByteWrapper records: ${errorString}</value>
+        <value xml:lang="fr">Erreur lors de l"ouverture du flux des enregistrements : ${errorString}</value>
         <value xml:lang="it">Errore unwrapping ByteWrapper records: ${errorString}</value>
     </property>
     <property key="EntityExtErrorSavingEntitySyncData">
         <value xml:lang="en">Error saving Entity Sync Data for entitySyncId ${entitySyncId}: ${errorString}</value>
+        <value xml:lang="fr">Erreur lors de la synchro de donnée pour la référence ${entitySyncId}: ${errorString}</value>
         <value xml:lang="it">Errore durante il salvataggio Entity Sync Data per entitySyncId ${entitySyncId}: ${errorString}</value>
     </property>
     <property key="EntityExtExceptionSavingEntitySyncData">
         <value xml:lang="en">Exception saving Entity Sync Data for entitySyncId ${entitySyncId}: ${errorString}</value>
+        <value xml:lang="fr">Exception lors de l'enregistrement de la synchro de donnée pour la référence ${entitySyncId}: ${errorString}</value>
         <value xml:lang="it">Eccezione durante il salvataggio Entity Sync Data per entitySyncId ${entitySyncId}: ${errorString}</value>
     </property>
     <property key="EntityExtFileNotFound">
         <value xml:lang="en">File not found: ${fileName}</value>
+        <value xml:lang="fr">Fichier ${fileName} non trouvé</value>
         <value xml:lang="it">File non trovato: ${fileName}</value>
     </property>
     <property key="EntityExtNoFileAvailableInTheRootDirectory">
         <value xml:lang="en">No files available for reading in this root directory: ${rootDirectory}</value>
+        <value xml:lang="fr">Aucun fichier disponible pour la lecture dans le répertoire ${rootDirectory}</value>
         <value xml:lang="it">Nessun file disponibile da leggere nella directory principale: ${rootDirectory}</value>
     </property>
     <property key="EntityExtOfflineXMLFileNotFound">
         <value xml:lang="en">Offline EntitySync XML file not found (${fileName})</value>
+        <value xml:lang="fr">Le fichier hors ligne (${fileName}) n'a pas été trouvé</value>
         <value xml:lang="it">File Offline EntitySync XML non trovato (${fileName})</value>
     </property>
     <property key="EntityExtProblemReadingFile">
         <value xml:lang="en">Problem reading file: ${fileName}</value>
+        <value xml:lang="fr">Problème lors de la lecture du fichier ${fileName}</value>
         <value xml:lang="it">Problema durante la lettura del file: ${fileName}</value>
     </property>
     <property key="EntityExtRootDirectoryDoesNotExists">
         <value xml:lang="en">Root directory does not exist or is not readable.</value>
+        <value xml:lang="fr">Le répertoire racine n'existe pas ou n'est pas lisible</value>
         <value xml:lang="it">Directory principale non esiste o non è leggibile.</value>
     </property>
     <property key="EntityExtServicePermissionNotGranted">
         <value xml:lang="en">You do not have permission to run this service.</value>
+        <value xml:lang="fr">Vous n'avez pas la permission d'exécuter ce service</value>
         <value xml:lang="it">Tu non hai il permesso di eseguire questo servizio.</value>
     </property>
     <property key="EntityExtThisServiceIsNotYetImplemented">
         <value xml:lang="en">This service is not implemented yet.</value>
+        <value xml:lang="fr">Ce service n'est pas implémenté actuellement</value>
         <value xml:lang="it">Questo servizio non è ancora implementato.</value>
     </property>
     <property key="EntityExtUnableToLoadXMLDocument">
         <value xml:lang="en">Unable to load EntitySync XML ${entitySyncId} - Problem at '${startTime}' Error: ${errorString}</value>
+        <value xml:lang="fr">Impossible de charger l'EntitySync XML ${entitySyncId} - Problème à '${startTime}' , avec l'erreur suivante : ${errorString}</value>
         <value xml:lang="it">Non è possibile caricare il EntitySync XML ${entitySyncId} - Problema alle '${startTime}' Errore: ${errorString}</value>
     </property>
     <property key="EntityExtUnableToLocateRootDirectory">
         <value xml:lang="en">Unable to locate root directory ${rootDirectory}</value>
+        <value xml:lang="fr">Impossible de localiser le répertoire racine ${rootDirectory}</value>
         <value xml:lang="it">Non è possibile localizzare la directory principale ${rootDirectory}</value>
     </property>
     <property key="EntityExtUnableToLocateRootDirectoryURI">
         <value xml:lang="en">Unable to get root directory URI</value>
+        <value xml:lang="fr">Impossible de récupérer le répertoire racine</value>
         <value xml:lang="it">Non è possibile localizzare la directory principale URI</value>
     </property>
 </resource>

Modified: ofbiz/branches/20111205EmailHandling/framework/entityext/ofbiz-component.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/entityext/ofbiz-component.xml?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/entityext/ofbiz-component.xml (original)
+++ ofbiz/branches/20111205EmailHandling/framework/entityext/ofbiz-component.xml Mon Mar 26 20:56:02 2012
@@ -22,6 +22,7 @@ under the License.
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
     <resource-loader name="main" type="component"/>
+    <classpath type="dir" location="config"/>
     <classpath type="jar" location="build/lib/*"/>
     
     <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel.xml"/>

Modified: ofbiz/branches/20111205EmailHandling/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java (original)
+++ ofbiz/branches/20111205EmailHandling/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java Mon Mar 26 20:56:02 2012
@@ -472,7 +472,7 @@ public class EntityDataLoadContainer imp
         List<String> infoMessages = FastList.newInstance();
         int totalRowsChanged = 0;
         if (UtilValidate.isNotEmpty(urlList)) {
-            Debug.logImportant("=-=-=-=-=-=-= Doing a data load with the following files:", module);
+            Debug.logImportant("=-=-=-=-=-=-= Doing a data load using delegator '" + delegator.getDelegatorName() + "' with the following files:", module);
             for (URL dataUrl: urlList) {
                 Debug.logImportant(dataUrl.toExternalForm(), module);
             }

Modified: ofbiz/branches/20111205EmailHandling/framework/entityext/src/org/ofbiz/entityext/synchronization/EntitySyncContext.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/entityext/src/org/ofbiz/entityext/synchronization/EntitySyncContext.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/entityext/src/org/ofbiz/entityext/synchronization/EntitySyncContext.java (original)
+++ ofbiz/branches/20111205EmailHandling/framework/entityext/src/org/ofbiz/entityext/synchronization/EntitySyncContext.java Mon Mar 26 20:56:02 2012
@@ -354,7 +354,7 @@ public class EntitySyncContext {
                 long valuesPerEntity = 0;
                 while ((nextValue = eli.next()) != null) {
                     // sort by the tx stamp and then the record stamp
-                    // find first value in valuesToStore list, starting with the current insertBefore value, that has a CREATE_STAMP_TX_FIELD after the nextValue.CREATE_STAMP_TX_FIELD, then do the same with CREATE_STAMP_FIELD
+                    // find first value in valuesToCreate list, starting with the current insertBefore value, that has a CREATE_STAMP_TX_FIELD after the nextValue.CREATE_STAMP_TX_FIELD, then do the same with CREATE_STAMP_FIELD
                     while (insertBefore < valuesToCreate.size() && valuesToCreate.get(insertBefore).getTimestamp(ModelEntity.CREATE_STAMP_TX_FIELD).before(nextValue.getTimestamp(ModelEntity.CREATE_STAMP_TX_FIELD))) {
                         insertBefore++;
                     }
@@ -441,7 +441,13 @@ public class EntitySyncContext {
             }
             Debug.logInfo(toCreateInfo.toString(), module);
         }
-
+        
+        // As the this.nextCreateTxTime calculation is only based on entities without values to create, if there at least one value to create returned
+        // this calculation is false, so it needs to be nullified
+        if (valuesToCreate.size() > 0) {
+            this.nextCreateTxTime = null;
+        }
+        
         return valuesToCreate;
     }
 
@@ -579,6 +585,12 @@ public class EntitySyncContext {
             }
             Debug.logInfo(toStoreInfo.toString(), module);
         }
+        
+        // As the this.nextUpdateTxTime calculation is only based on entities without values to store, if there at least one value to store returned
+        // this calculation is false, so it needs to be nullified
+        if (valuesToStore.size() > 0) {
+            this.nextUpdateTxTime = null;
+        }        
 
         return valuesToStore;
     }
@@ -653,8 +665,8 @@ public class EntitySyncContext {
                 eliNext.close();
                 if (firstVal != null) {
                     Timestamp nextTxTime = firstVal.getTimestamp(ModelEntity.STAMP_TX_FIELD);
-                    if (this.nextUpdateTxTime == null || nextTxTime.before(this.nextUpdateTxTime)) {
-                        this.nextUpdateTxTime = nextTxTime;
+                    if (this.nextRemoveTxTime == null || nextTxTime.before(this.nextRemoveTxTime)) {
+                        this.nextRemoveTxTime = nextTxTime;
                     }
                 }
             }
@@ -695,6 +707,12 @@ public class EntitySyncContext {
             Debug.logInfo(toRemoveInfo.toString(), module);
         }
 
+        // As this.nextRemoveTxTime calculation is only based on entities without keys to remove, if there at least one key to remove returned
+        // this calculation is false, so it needs to be nullified
+        if (keysToRemove.size() > 0) {
+            this.nextRemoveTxTime = null;
+        }
+        
         return keysToRemove;
     }
 

Modified: ofbiz/branches/20111205EmailHandling/framework/example/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/example/build.xml?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/example/build.xml (original)
+++ ofbiz/branches/20111205EmailHandling/framework/example/build.xml Mon Mar 26 20:56:02 2012
@@ -37,6 +37,9 @@ under the License.
     <path id="local.class.path">
         <fileset dir="${lib.dir}" includes="*.jar"/>
         <fileset dir="../../framework/base/lib" includes="*.jar"/>
+        <fileset dir="../../framework/base/lib/commons" includes="*.jar"/>
+        <fileset dir="../../framework/base/lib/j2eespecs" includes="*.jar"/>
+        <fileset dir="../../framework/base/lib/scripting" includes="*.jar"/>
         <fileset dir="../../framework/base/build/lib" includes="*.jar"/>
         <fileset dir="../../framework/entity/lib" includes="*.jar"/>
         <fileset dir="../../framework/entity/build/lib" includes="*.jar"/>
@@ -47,5 +50,8 @@ under the License.
         <fileset dir="../../framework/widget/build/lib" includes="*.jar"/>
         <fileset dir="../../framework/webapp/lib" includes="*.jar"/>
         <fileset dir="../../framework/webapp/build/lib" includes="*.jar"/>
+        <fileset dir="../../framework/common/build/lib" includes="*.jar"/>
+        <fileset dir="../../framework/jcr/lib" includes="*.jar"/>
+        <fileset dir="../../framework/jcr/build/lib" includes="*.jar"/>
     </path>
 </project>

Modified: ofbiz/branches/20111205EmailHandling/framework/example/config/ExampleUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/example/config/ExampleUiLabels.xml?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/example/config/ExampleUiLabels.xml (original)
+++ ofbiz/branches/20111205EmailHandling/framework/example/config/ExampleUiLabels.xml Mon Mar 26 20:56:02 2012
@@ -19,6 +19,34 @@
     under the License.
 -->
 <resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <property key="ExampelsJackrabbitDownloadFile">
+        <value xml:lang="de">Datei herunterladen</value>
+        <value xml:lang="en">Download file</value>
+    </property>
+    <property key="ExampelsJackrabbitOpenData">
+        <value xml:lang="de">Content öffnen.</value>
+        <value xml:lang="en">Open content.</value>
+    </property>
+    <property key="ExampelsJackrabbitOpenFile">
+        <value xml:lang="de">Datei öffnen</value>
+        <value xml:lang="en">Open file</value>
+    </property>
+    <property key="ExampelsJackrabbitRemoveData">
+        <value xml:lang="de">Content löschen.</value>
+        <value xml:lang="en">Remove content.</value>
+    </property>
+    <property key="ExampelsJackrabbitRemoveFile">
+        <value xml:lang="de">Datei löschen</value>
+        <value xml:lang="en">Remove file</value>
+    </property>
+    <property key="ExampleAddNewContentEntry">
+        <value xml:lang="de">Einen neuen Content Eintrag hinzufügen</value>
+        <value xml:lang="en">Add a new content entry</value>
+    </property>
+    <property key="ExampleAddNewNodePath">
+        <value xml:lang="de">Füge einen neuen Node Pfad hinzu, z.B. /Foo/Baa speichert die Datei im Ordner "Baa"</value>
+        <value xml:lang="en">Add a (new) node path like /Foo/Baa will store the file under the folder "Baa"</value>
+    </property>
     <property key="ExampleAjaxExamples">
         <value xml:lang="en">Ajax Examples</value>
         <value xml:lang="fr">Exemples Ajax</value>
@@ -40,7 +68,7 @@
         <value xml:lang="ru">Приложение Пример</value>
         <value xml:lang="th">ตัวอย่างโปรแกรมคอมพิวเตอร์</value>
         <value xml:lang="zh">样例应用</value>
-    </property>    
+    </property>
     <property key="ExampleAutocompleteDropdown">
         <value xml:lang="en">Autocomplete Dropdown</value>
         <value xml:lang="fr">Liste déroulante à auto complétion</value>
@@ -49,6 +77,14 @@
         <value xml:lang="en">COUNTRY type based example, use Geo.Geoid and Geo.GeoName Entity.fields for completion</value>
         <value xml:lang="fr">Exemple sur le type COUNTRY et utilisant Geo.Geoid et Geo.GeoName comme Entité.champs pour la complétion</value>
     </property>
+    <property key="ExampleBaseNodeVersion">
+        <value xml:lang="de">Verion des Content Knoten</value>
+        <value xml:lang="en">Version of the base content node</value>
+    </property>
+    <property key="ExampleBirtExamples">
+        <value xml:lang="en">BIRT Examples</value>
+        <value xml:lang="th">ตัวอย่าง BIRT</value>
+    </property>
     <property key="ExampleBirtChartReport">
         <value xml:lang="en">HTML chart report</value>
         <value xml:lang="fr">Graphiques HTML</value>
@@ -57,15 +93,19 @@
         <value xml:lang="en">PDF chart report</value>
         <value xml:lang="fr">Graphiques PDF</value>
     </property>
-    <property key="ExampleBirtReport">
-        <value xml:lang="en">HTML</value>
-    </property>
     <property key="ExampleBirtMail">
         <value xml:lang="en">Send any format through Mail</value>
     </property>
+    <property key="ExampleBirtReport">
+        <value xml:lang="en">HTML</value>
+    </property>
     <property key="ExampleBirtViewHandler">
         <value xml:lang="en">PDF</value>
     </property>
+    <property key="ExampleCalendarFromLayer">
+        <value xml:lang="en">Calendar field (only test purp.)</value>
+        <value xml:lang="fr">Calendrier (only test)</value>
+    </property>
     <property key="ExampleCompanyName">
         <value xml:lang="en">OFBiz: Example</value>
         <value xml:lang="fr">OFBiz : Exemple</value>
@@ -74,11 +114,7 @@
         <value xml:lang="ru">OFBiz: Пример</value>
         <value xml:lang="th">OFBiz: ตัวอย่าง</value>
         <value xml:lang="zh">OFBiz: 样例</value>
-    </property>    
-    <property key="ExampleCalendarFromLayer">
-        <value xml:lang="en">Calendar field (only test purp.)</value>
-        <value xml:lang="fr">Calendrier (only test)</value>
-    </property>    
+    </property>
     <property key="ExampleCompanySubtitle">
         <!--value xml:lang="ar">جزء من عائلة أوفبيز للبرمجيات الحرة</value-->
         <value xml:lang="ar">جزء من عائلة أوفبيز للتطبيقات الحرة للتسيير</value>
@@ -239,7 +275,11 @@
         <value xml:lang="fr"> - voir la défintion avec la form de nom </value>
         <value xml:lang="it"> - vedi la definizione della form con il nome</value>
         <value xml:lang="zh"> - 参见表单定义,名称为</value>
-    </property>    
+    </property>
+    <property key="ExampleDependentDropDownTooltip">
+        <value xml:lang="en">Needs some fields to be set, see in FormWidgetExampleScreens.xml (begins with dependentForm)</value>
+        <value xml:lang="fr">Nécessite de définir certains champs, voir dans FormWidgetExampleScreens.xml (commence avec dependentForm)</value>
+    </property>
     <property key="ExampleDependentDropDowns">
         <value xml:lang="en">Dependent drop-downs</value>
         <value xml:lang="fr">liste déroulante dépendantes</value>
@@ -352,10 +392,6 @@
         <value xml:lang="it">Campi drop down</value>
         <value xml:lang="zh">下拉框数据项</value>
     </property>
-    <property key="ExampleDependentDropDownTooltip">
-        <value xml:lang="en">Needs some fields to be set, see in FormWidgetExampleScreens.xml (begins with dependentForm)</value>
-        <value xml:lang="fr">Nécessite de définir certains champs, voir dans FormWidgetExampleScreens.xml (commence avec dependentForm)</value>
-    </property>
     <property key="ExampleDropDownTooltip">
         <value xml:lang="en">First of all you have to define a drop-down element inside of the field element that you want to render as a drop down field.</value>
         <value xml:lang="fr">Pour commencer vous définissez un élément liste déroulante (drop-down) à l'intérieur de l'élément champ (field) que vous voulez créer comme liste déroulante</value>
@@ -459,14 +495,6 @@
         <value xml:lang="th">ตัวอย่างรูปแบบ Widget</value>
         <value xml:lang="zh">表单挂件样例</value>
     </property>
-    <property key="ExamplePortletAttributNeedToBeDefineClickHere">
-        <value xml:lang="en">Portlet Attribut need to be define, click here to resolve it </value>
-        <value xml:lang="fr">Les attributs de la portlet doivent être definie. Cliquez ici pour résoudre le problème.</value>
-    </property>
-    <property key="ExamplePortletGoToConfiguredPortalPage">
-        <value xml:lang="en">Go to configured portal page -> </value>
-        <value xml:lang="fr">Allez à la page portail configurée -> </value>
-    </property>
     <property key="ExampleGroupField">
         <value xml:lang="en">Group</value>
         <value xml:lang="it">Gruppo</value>
@@ -476,24 +504,64 @@
         <value xml:lang="en">Fields groups</value>
         <value xml:lang="it">Gruppi campi</value>
         <value xml:lang="zh">数据项组</value>
-    </property>    
-    <property key="ExampleLongDescription">
-        <value xml:lang="en">Long Description</value>
-        <value xml:lang="it">Descrizione lunga</value>
-        <value xml:lang="zh">详细描述</value>
+    </property>
+    <property key="ExampleJackrabbitCleanRepository">
+        <value xml:lang="de">Repository aufräumen</value>
+        <value xml:lang="en">Clean repository</value>
+    </property>
+    <property key="ExampleJackrabbitCleanRepositoryTooltip">
+        <value xml:lang="de">Löscht alle Nodes aus dem Repository, die keine Verkünpfung in der Content Tabelle haben.</value>
+        <value xml:lang="en">Removes all nodes which are not linked in the content table.</value>
+    </property>
+    <property key="ExampleJackrabbitListNodes">
+        <value xml:lang="de">Liste alles Knoten</value>
+        <value xml:lang="en">List Nodes</value>
+    </property>
+    <property key="ExampleJackrabbitQueryForContent">
+        <value xml:lang="de">Das Repository kann mit Hilfe der SQL2 oder JQOM Query Language durchsucht werden: z.B. SELECT * FROM [nt:unstructured] gibt alle nodes vom Typ nt:unstructured zurück.</value>
+        <value xml:lang="en">You can search the repository by using SQL2 or JQOM query syntax: i.e. SELECT * FROM [nt:unstructured] gives all nodes with the typ nt:unstructured.</value>
+    </property>
+    <property key="ExampleJackrabbitQuickContentSelect">
+        <value xml:lang="de">Content Schnellauswahl - Content Node auswählen und Sprache bestimmen.</value>
+        <value xml:lang="en">Content quick select - Choose your content node and select a language.</value>
+    </property>
+    <property key="ExampleJackrabbitShowContentData">
+        <value xml:lang="de">(Text) Content anzeigen</value>
+        <value xml:lang="en">Show (text) content</value>
+    </property>
+    <property key="ExampleJackrabbitShowUploadedFiles">
+        <value xml:lang="de">Dateien anzeigen</value>
+        <value xml:lang="en">Show uploaded Files</value>
+    </property>
+    <property key="ExampleJackrabbitTryRightClick">
+        <value xml:lang="de">Wähle eine Datei und versuche einen Rechtklick</value>
+        <value xml:lang="en">Choose a file and try a 'right click'</value>
+    </property>
+    <property key="ExampleJackrabbitUploadFileData">
+        <value xml:lang="de">Eine neue Datei speichern</value>
+        <value xml:lang="en">Upload a new file</value>
+    </property>
+    <property key="ExampleLanguageTextVersion">
+        <value xml:lang="de">Verion der gewählten sprache</value>
+        <value xml:lang="en">Version of the choosen language</value>
     </property>
     <property key="ExampleLayerFromLayer">
         <value xml:lang="en">Layered lookup field (only test purp.)</value>
         <value xml:lang="fr">Lookup de type layer (only test)</value>
     </property>
-    <property key="ExampleLookupFieldsTitle">
-        <value xml:lang="en">Lookup Fields</value>
-        <value xml:lang="fr">Champs de recherche</value>
+    <property key="ExampleLongDescription">
+        <value xml:lang="en">Long Description</value>
+        <value xml:lang="it">Descrizione lunga</value>
+        <value xml:lang="zh">详细描述</value>
     </property>
     <property key="ExampleLookupFields">
         <value xml:lang="en">Lookup Fields: First of type popup, second layered and showing use of set_values underneath, ie returning not only Id but also another value. Both using also autocomplete</value>
         <value xml:lang="fr">Champs de recherche: le premier de type popup, le second de type layer avec usage sous-jacent de set_values qui permet de traiter non seulement une référence mais aussi une autre valeur. Les 2 utilisent aussi l'autocompletion</value>
     </property>
+    <property key="ExampleLookupFieldsTitle">
+        <value xml:lang="en">Lookup Fields</value>
+        <value xml:lang="fr">Champs de recherche</value>
+    </property>
     <property key="ExampleMainPage">
         <value xml:lang="en">Example Main Page</value>
         <value xml:lang="fr">Exemple de page principale</value>
@@ -510,14 +578,14 @@
         <value xml:lang="th">สำหรับท่านที่สนใจสามารถเข้าสู่ระบบได้, โดยใช้ ชื่อผู้ใช้:admin, รหัสผ่าน:ofbiz</value>
         <value xml:lang="zh">如果对某部分感兴趣,请先确信你已登录,可以尝试用 用户名:admin、密码:ofbiz登录。</value>
     </property>
-    <property key="ExampleMultipleDropDowns">
-        <value xml:lang="en">Multiple drop-downs</value>
-        <value xml:lang="fr">liste déroulante avec choix multiples</value>
-    </property>    
     <property key="ExampleMultipleDropDownTooltip">
         <value xml:lang="en">Needs some fields to be set, see in FormWidgetExampleScreens.xml (begins with multipleSelect)</value>
         <value xml:lang="fr">Nécessite de définir certains champs, voir dans FormWidgetExampleScreens.xml (commence avec multipleSelect)</value>
-    </property>    
+    </property>
+    <property key="ExampleMultipleDropDowns">
+        <value xml:lang="en">Multiple drop-downs</value>
+        <value xml:lang="fr">liste déroulante avec choix multiples</value>
+    </property>
     <property key="ExampleNewExample">
         <value xml:lang="en">New Example</value>
         <value xml:lang="fr">Nouvel exemple</value>
@@ -565,11 +633,19 @@
         <value xml:lang="en">Geolocation via address</value>
         <value xml:lang="fr">Géolocalisation par l'adresse</value>
     </property>
+    <property key="ExamplePortletAttributNeedToBeDefineClickHere">
+        <value xml:lang="en">Portlet Attribut need to be define, click here to resolve it </value>
+        <value xml:lang="fr">Les attributs de la portlet doivent être definie. Cliquez ici pour résoudre le problème.</value>
+    </property>
     <property key="ExamplePortletFirst">
         <value xml:lang="en">Hi, this is a first example of portlet</value>
         <value xml:lang="it">Salve, questo è il primo esempio di portlet</value>
         <value xml:lang="zh">你好,这是第一个Portlet样例</value>
     </property>
+    <property key="ExamplePortletGoToConfiguredPortalPage">
+        <value xml:lang="en">Go to configured portal page -&gt; </value>
+        <value xml:lang="fr">Allez à la page portail configurée -&gt; </value>
+    </property>
     <property key="ExamplePortletSecond">
         <value xml:lang="en">Hi, this is a second example of portlet</value>
         <value xml:lang="it">Salve, questo è il secondo esempio di portlet</value>
@@ -595,6 +671,26 @@
         <value xml:lang="it">Bottone di stampa</value>
         <value xml:lang="zh">打印按钮</value>
     </property>
+    <property key="ExampleRepositoryFile">
+        <value xml:lang="de">Datei</value>
+        <value xml:lang="en">File</value>
+    </property>
+    <property key="ExampleRepositoryFolder">
+        <value xml:lang="de">Ordner</value>
+        <value xml:lang="en">Folder</value>
+    </property>
+    <property key="ExampleRepositoryMessage">
+        <value xml:lang="de">Text Nachricht</value>
+        <value xml:lang="en">Text message</value>
+    </property>
+    <property key="ExampleRepositoryNode">
+        <value xml:lang="de">Knoten</value>
+        <value xml:lang="en">Node</value>
+    </property>
+    <property key="ExampleScanRepositoryStrukture">
+        <value xml:lang="de">Repository Struktur überprüfen</value>
+        <value xml:lang="en">Scan repository structure</value>
+    </property>
     <property key="ExampleSelectionBoxes">
         <value xml:lang="en">Selection boxes</value>
         <value xml:lang="fr">Boutons de sélection</value>
@@ -730,6 +826,10 @@
         <value xml:lang="th">แก้ไขสินค้าตัวอย่าง</value>
         <value xml:lang="zh">编辑样例明细</value>
     </property>
+    <property key="PageTitleExampleJackrabbit">
+        <value xml:lang="de">Jackrabbit</value>
+        <value xml:lang="en">Jackrabbit</value>
+    </property>
     <!-- Page Titles -->
     <property key="PageTitleFindExample">
         <value xml:lang="en">Find Example</value>

Modified: ofbiz/branches/20111205EmailHandling/framework/example/webapp/birt/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/example/webapp/birt/WEB-INF/controller.xml?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/example/webapp/birt/WEB-INF/controller.xml (original)
+++ ofbiz/branches/20111205EmailHandling/framework/example/webapp/birt/WEB-INF/controller.xml Mon Mar 26 20:56:02 2012
@@ -25,7 +25,7 @@ under the License.
          elements found in the common-controller.xml file. -->
     <include location="component://common/webcommon/WEB-INF/common-controller.xml"/>
     
-    <description>Birt Component Site Configuration File</description>
+    <description>BIRT Component Site Configuration File</description>
     
     <!--
       These can be used to return the reports as views; make sure the classes are compiled and available
@@ -91,9 +91,13 @@ under the License.
     <!--
         text/html
         application/pdf
+        application/postscript
         application/vnd.ms-excel
         application/vnd.ms-word
         application/vnd.ms-powerpoint
+        application/vnd.oasis.opendocument.text
+        application/vnd.oasis.opendocument.spreadsheet
+        application/vnd.oasis.opendocument.presentation
      -->
     <view-map name="ViewHandler" type="birt" page="component://example/webapp/birt/report/example.rptdesign" content-type="application/pdf"/>
     <view-map name="chartViewHandler" type="birt" page="component://example/webapp/birt/report/chart.rptdesign" content-type="application/pdf"/>

Modified: ofbiz/branches/20111205EmailHandling/framework/example/webapp/example/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/example/webapp/example/WEB-INF/controller.xml?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/example/webapp/example/WEB-INF/controller.xml (original)
+++ ofbiz/branches/20111205EmailHandling/framework/example/webapp/example/WEB-INF/controller.xml Mon Mar 26 20:56:02 2012
@@ -28,7 +28,7 @@ under the License.
     <include location="component://example/webapp/birt/WEB-INF/controller.xml"/>
 
     <description>Example Component Site Configuration File</description>
-    
+
     <!--
       These can be used to return the reports as views; make sure the classes are compiled and available
         <handler name="datavision" type="view" class="org.ofbiz.webapp.view.DataVisionViewHandler"/>
@@ -50,7 +50,7 @@ under the License.
 
     <!-- Request Mappings -->
     <request-map uri="main"><security https="true" auth="true"/><response name="success" type="view" value="main"/></request-map>
-    
+
     <!-- Example Requests -->
     <request-map uri="FindExample"><security https="true" auth="true"/><response name="success" type="view" value="FindExample"/></request-map>
     <request-map uri="EditExample"><security https="true" auth="true"/><response name="success" type="view" value="EditExample"/></request-map>
@@ -185,7 +185,7 @@ under the License.
     </request-map>
     <request-map uri="findExampleFeatures">
         <security https="true" auth="true"/>
-        <event type="groovy" path="component://example/webapp/example/WEB-INF/actions/includes/" invoke="FindExampleFeatures.groovy"/>
+        <event type="groovy" path="component://example/webapp/example/WEB-INF/actions/includes/FindExampleFeatures.groovy"/>
         <response name="success" type="view" value="ajaxAutocompleteOptions"/>
         <response name="error" type="view" value="ajaxAutocompleteOptions"/>
     </request-map>
@@ -219,7 +219,7 @@ under the License.
     <request-map uri="ExampleOsmGeoLocationPointSet3"><security https="true" auth="true"/><response name="success" type="view" value="ExampleOsmGeoLocationPointSet3"/></request-map>
     <request-map uri="ExampleOsmGeoLocationPointSet4"><security https="true" auth="true"/><response name="success" type="view" value="ExampleOsmGeoLocationPointSet4"/></request-map>
 
-    <!-- Birt example Requests -->
+    <!-- BIRT example Requests -->
     <request-map uri="BirtMain">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="BirtMain"/>
@@ -236,6 +236,95 @@ under the License.
     </request-map>
     <!-- end of request mappings -->
 
+    <!-- Jackrabbit Example Requests -->
+    <request-map uri="ExampleJackrabbit">
+        <security auth="true" https="true" />
+        <response name="success" type="view" value="ExampleJackrabbit" />
+        <response name="error" type="view" value="ExampleJackrabbit" />
+    </request-map>
+    <request-map uri="ExampleJackrabbitAddData">
+        <security auth="true" https="true" />
+        <response name="success" type="view" value="ExampleJackrabbitAddData" />
+        <response name="error" type="view" value="ExampleJackrabbitAddData" />
+    </request-map>
+    <request-map uri="StoreNewRepositoryData">
+        <security auth="true" https="true" />
+        <event type="java" path="org.ofbiz.example.JackrabbitEvents" invoke="addNewTextMessageToJcrRepository" />
+        <response name="success" type="request" value="ExampleJackrabbitShowContentData" />
+        <response name="error" type="view" value="ExampleJackrabbitAddData" />
+    </request-map>
+    <request-map uri="ExampleJackrabbitScanRepositoryStructure">
+        <security auth="true" https="true" />
+        <event type="java" path="org.ofbiz.example.JackrabbitEvents" invoke="scanRepositoryStructure"/>
+        <response name="success" type="view" value="ExampleJackrabbitScanRepositoryStructure" />
+        <response name="error" type="view" value="ExampleJackrabbitScanRepositoryStructure" />
+    </request-map>
+    <request-map uri="EditRepositoryContent">
+        <security auth="true" https="true" />
+        <event type="java" path="org.ofbiz.example.JackrabbitEvents" invoke="getNodeContent"/>
+        <response name="success" type="view" value="ExampleJackrabbitEditRepositoryContent" />
+        <response name="error" type="request" value="ExampleJackrabbitShowContentData" />
+    </request-map>
+    <request-map uri="UpdateRepositoryData">
+        <security auth="true" https="true" />
+        <event type="java" path="org.ofbiz.example.JackrabbitEvents" invoke="updateRepositoryData"/>
+        <response name="success" type="request" value="EditRepositoryContent" />
+        <response name="error" type="request" value="EditRepositoryContent" />
+    </request-map>
+    <request-map uri="RemoveRepositoryNode">
+        <security auth="true" https="true" />
+        <event type="java" path="org.ofbiz.example.JackrabbitEvents" invoke="removeRepositoryNode"/>
+        <response name="success" type="request" value="ExampleJackrabbitShowContentData" />
+        <response name="error" type="request" value="ExampleJackrabbitShowContentData" />
+    </request-map>
+    <request-map uri="RemoveRepositoryFile">
+        <security auth="true" https="true" />
+        <event type="java" path="org.ofbiz.example.JackrabbitEvents" invoke="removeRepositoryNode"/>
+        <response name="success" type="request" value="ExampleJackrabbitShowUploadedFiles" />
+        <response name="error" type="request" value="ExampleJackrabbitShowUploadedFiles" />
+    </request-map>
+    <request-map uri="ExampleJackrabbitUploadFileData">
+        <security auth="true" https="true" />
+        <response name="success" type="view" value="ExampleJackrabbitUploadFileData" />
+        <response name="error" type="view" value="ExampleJackrabbitUploadFileData" />
+    </request-map>
+    <request-map uri="StoreNewRepositoryFileData">
+        <security auth="true" https="true" />
+        <event type="java" path="org.ofbiz.example.JackrabbitEvents" invoke="uploadFileData"/>
+        <response name="success" type="request" value="ExampleJackrabbitShowUploadedFiles" />
+        <response name="error" type="view" value="ExampleJackrabbitUploadFileData" />
+    </request-map>
+    <request-map uri="ExampleJackrabbitShowUploadedFiles">
+        <security auth="true" https="true" />
+        <event type="java" path="org.ofbiz.example.JackrabbitEvents" invoke="getRepositoryFileTree"/>
+        <response name="success" type="view" value="ExampleJackrabbitShowUploadedFiles" />
+        <response name="error" type="view" value="ExampleJackrabbitShowUploadedFiles" />
+    </request-map>
+    <request-map uri="GetFileFromRepository">
+        <security auth="true" https="true" />
+        <event type="java" path="org.ofbiz.example.JackrabbitEvents" invoke="getFileFromRepository"/>
+        <response name="success" type="none" />
+        <response name="error" type="none" />
+    </request-map>
+    <request-map uri="ExampleJackrabbitShowContentData">
+        <security auth="true" https="true" />
+        <event type="java" path="org.ofbiz.example.JackrabbitEvents" invoke="getRepositoryDataTree"/>
+        <response name="success" type="view" value="ExampleJackrabbitShowContentData"/>
+        <response name="error" type="view" value="ExampleJackrabbitShowContentData"/>
+    </request-map>
+    <request-map uri="OpenFileInformation">
+        <security auth="true" https="true" />
+        <event type="java" path="org.ofbiz.example.JackrabbitEvents" invoke="getFileInformation"/>
+        <response name="success" type="view" value="ExampleJackrabbitOpenFileInformation"/>
+        <response name="error" type="view" value="ExampleJackrabbitShowUploadedFiles"/>
+    </request-map>
+    <request-map uri="QueryRepositoryData">
+        <security auth="true" https="true" />
+        <event type="java" path="org.ofbiz.example.JackrabbitEvents" invoke="queryRepositoryData"/>
+        <response name="success" type="view" value="ExampleJackrabbitShowQueryResult"/>
+        <response name="error" type="request" value="ExampleJackrabbitShowContentData"/>
+    </request-map>
+
     <!-- View Mappings -->
     <view-map name="main" type="screen" page="component://example/widget/example/CommonScreens.xml#main"/>
 
@@ -273,20 +362,36 @@ under the License.
     <view-map name="ExampleOsmGeoLocationPointSet3" type="screen" page="component://example/widget/example/ExampleScreens.xml#ExampleOsmGeoLocationPointSet3"/>
     <view-map name="ExampleOsmGeoLocationPointSet4" type="screen" page="component://example/widget/example/ExampleScreens.xml#ExampleOsmGeoLocationPointSet4"/>
 
-    <!-- Birt example View Mappings -->
+    <!-- BIRT example View Mappings -->
     <view-map name="BirtMain" type="screen" page="component://example/widget/example/BirtScreens.xml#main"/>
 
     <!-- Flot view mapping -->
     <view-map name="ExampleBarChart" page="component://example/widget/example/ExampleScreens.xml#ExampleBarChart" type="screen"/>
     <view-map name="ExamplePieChart" page="component://example/widget/example/ExampleScreens.xml#ExamplePieChart" type="screen"/>
 
+    <!-- Jackrabbit View Mapping -->
+    <view-map name="ExampleJackrabbit" page="component://example/widget/example/ExampleJackrabbitScreens.xml#ListRepositoryData" type="screen" />
+    <view-map name="ExampleJackrabbitAddData" page="component://example/widget/example/ExampleJackrabbitScreens.xml#ExampleJackrabbitAddData" type="screen" />
+    <view-map name="ExampleJackrabbitScanRepositoryStructure" page="component://example/widget/example/ExampleJackrabbitScreens.xml#ExampleJackrabbitScanRepositoryStructure" type="screen" />
+    <view-map name="ExampleJackrabbitEditRepositoryContent" page="component://example/widget/example/ExampleJackrabbitScreens.xml#ExampleJackrabbitEditRepositoryContent" type="screen" />
+    <view-map name="ExampleJackrabbitUploadFileData" page="component://example/widget/example/ExampleJackrabbitScreens.xml#ExampleJackrabbitUploadFileData" type="screen" />
+    <view-map name="ExampleJackrabbitShowUploadedFiles" page="component://example/widget/example/ExampleJackrabbitScreens.xml#ExampleJackrabbitShowUploadedFiles" type="screen" />
+    <view-map name="ExampleJackrabbitShowContentData" page="component://example/widget/example/ExampleJackrabbitScreens.xml#ExampleJackrabbitShowContentData" type="screen" />
+    <view-map name="ExampleJackrabbitOpenFileInformation" page="component://example/widget/example/ExampleJackrabbitScreens.xml#ExampleJackrabbitShowFileInformation" type="screen" />
+    <view-map name="ExampleJackrabbitShowQueryResult" page="component://example/widget/example/ExampleJackrabbitScreens.xml#ExampleJackrabbitShowQueryResult" type="screen" />
+
+
     <!-- Supported Content Types -->
     <!--
         text/html
         application/pdf
+        application/postscript
         application/vnd.ms-excel
         application/vnd.ms-word
         application/vnd.ms-powerpoint
+        application/vnd.oasis.opendocument.text
+        application/vnd.oasis.opendocument.spreadsheet
+        application/vnd.oasis.opendocument.presentation
      -->
 
     <!-- end of view mappings -->

Modified: ofbiz/branches/20111205EmailHandling/framework/example/widget/example/BirtForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/example/widget/example/BirtForms.xml?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/example/widget/example/BirtForms.xml (original)
+++ ofbiz/branches/20111205EmailHandling/framework/example/widget/example/BirtForms.xml Mon Mar 26 20:56:02 2012
@@ -30,9 +30,13 @@ under the License.
             <drop-down>
                 <option key="text/html" description="text/html"/>
                 <option key="application/pdf" description="application/pdf"/>
+                <option key="application/postscript" description="application/postscript"/>
                 <option key="application/vnd.ms-excel" description="application/vnd.ms-excel"/>
                 <option key="application/vnd.ms-word" description="application/vnd.ms-word"/>
                 <option key="application/vnd.ms-powerpoint" description="application/vnd.ms-powerpoint"/>
+                <option key="application/vnd.oasis.opendocument.text" description="application/vnd.oasis.opendocument.text"/>
+                <option key="application/vnd.oasis.opendocument.spreadsheet" description="application/vnd.oasis.opendocument.spreadsheet"/>
+                <option key="application/vnd.oasis.opendocument.presentation" description="application/vnd.oasis.opendocument.presentation"/>
             </drop-down>
         </field>
         <field name="attachmentName"><text/></field>

Modified: ofbiz/branches/20111205EmailHandling/framework/example/widget/example/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/example/widget/example/CommonScreens.xml?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/example/widget/example/CommonScreens.xml (original)
+++ ofbiz/branches/20111205EmailHandling/framework/example/widget/example/CommonScreens.xml Mon Mar 26 20:56:02 2012
@@ -294,6 +294,32 @@ under the License.
         </section>
     </screen>
 
+    <screen name="CommonExampleJackrabbitDecorator">
+        <section>
+            <actions>
+                <set field="headerItem" value="ExampleJackrabbit" />
+                <set field="labelFieldName" value="exampleTypeId" />
+                <set field="dataFieldName" value="total" />
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator"
+                    location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="pre-body">
+                        <include-menu name="ExampleJackrabbit" location="component://example/widget/example/ExampleMenus.xml"/>
+                    </decorator-section>
+                    <decorator-section name="body">
+                        <container style="clear" />
+                        <section>
+                            <widgets>
+                                <decorator-section-include name="body" />
+                            </widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
     <screen name="main">
         <!-- This is the screen for the Main page in the Example component. A common pattern
             in OFBiz is to have each component include a Main page as a starting point for

Modified: ofbiz/branches/20111205EmailHandling/framework/example/widget/example/ExampleForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/example/widget/example/ExampleForms.xml?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/example/widget/example/ExampleForms.xml (original)
+++ ofbiz/branches/20111205EmailHandling/framework/example/widget/example/ExampleForms.xml Mon Mar 26 20:56:02 2012
@@ -104,7 +104,7 @@ under the License.
         <field use-when="example!=null" name="exampleId" title="${uiLabelMap.ExampleExampleId}" tooltip="${uiLabelMap.CommonNotModifRecreat}"><display/></field>
         <field use-when="example==null @and exampleId==null" name="exampleId" title="${uiLabelMap.ExampleExampleId}"><ignored/></field>
         <field use-when="example==null @and exampleId!=null" name="exampleId" title="${uiLabelMap.ExampleExampleId}"><display description="${uiLabelMap.CommonCannotBeFound}: [${exampleId}]" also-hidden="false"/></field>
-        <field name="exampleTypeId" title="${uiLabelMap.CommonType}" id-name="exampleTypeId">
+        <field name="exampleTypeId" title="${uiLabelMap.CommonType}" id-name="exampleTypeId" widget-style="required">
             <drop-down allow-empty="false">
                 <!-- this is a neat feature, but not good for the type because the user would have to know the possible types in order to enter at least the first letter, so leaving it out by default; just uncomment to enable: <auto-complete/> -->
                 <entity-options entity-name="ExampleType" description="${description}">
@@ -112,18 +112,19 @@ under the License.
                 </entity-options>
             </drop-down>
         </field>
-        <field name="statusId"  use-when="example==null" title="${uiLabelMap.CommonStatus}">
+        <field name="statusId"  use-when="example==null" title="${uiLabelMap.CommonStatus}" widget-style="required">
             <drop-down allow-empty="false">
                 <entity-options entity-name="ExampleStatusItem" description="${description}"/>
             </drop-down>
         </field>
-        <field name="statusId" use-when="example!=null" title="${uiLabelMap.CommonStatus}">
+        <field name="statusId" use-when="example!=null" title="${uiLabelMap.CommonStatus}" widget-style="required">
             <drop-down allow-empty="false" current-description="${currentStatus.description}">
                 <entity-options entity-name="StatusValidChangeToDetail" key-field-name="statusIdTo" description="${transitionName} (${description})">
                     <entity-constraint name="statusId" env-name="example.statusId"/>
                 </entity-options>
             </drop-down>
         </field>
+        <field name="exampleName" required-field="true" widget-style="required"></field>
         <field name="description" title="${uiLabelMap.CommonDescription}"/>
         <field name="longDescription" title="${uiLabelMap.ExampleLongDescription}"/>
         <field name="anotherText">

Modified: ofbiz/branches/20111205EmailHandling/framework/example/widget/example/ExampleMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/example/widget/example/ExampleMenus.xml?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/example/widget/example/ExampleMenus.xml (original)
+++ ofbiz/branches/20111205EmailHandling/framework/example/widget/example/ExampleMenus.xml Mon Mar 26 20:56:02 2012
@@ -42,12 +42,13 @@ under the License.
         <menu-item name="ExampleGeoLocation" title="${uiLabelMap.CommonGeoLocation}">
             <link target="ExampleGeoLocationPointSet1"/>
         </menu-item>
-        <menu-item name="Birt" title="${uiLabelMap.Birt}">
+        <menu-item name="Birt" title="${uiLabelMap.ExampleBirtExamples}">
             <link target="BirtMain"/>
         </menu-item>
         <menu-item name="ExampleCharts" title="Chart examples">
             <link target="ExampleBarChart"/>
         </menu-item>
+        <menu-item name="ExampleJackrabbit" title="${uiLabelMap.PageTitleExampleJackrabbit}"><link target="ExampleJackrabbitShowContentData"/></menu-item>
     </menu>
 
     <menu name="EditExample" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
@@ -101,4 +102,12 @@ under the License.
         <menu-item name="ExampleBarChart" title="Bar chart"><link target="ExampleBarChart"/></menu-item>
         <menu-item name="ExamplePieChart" title="Pie chart"><link target="ExamplePieChart"/></menu-item>
     </menu>
+
+    <menu name="ExampleJackrabbit" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
+        <menu-item name="ExampleJackrabbitShowContentData" title="${uiLabelMap.ExampleJackrabbitShowContentData}"><link target="ExampleJackrabbitShowContentData"/></menu-item>
+        <menu-item name="ExampleJackrabbitAddData" title="${uiLabelMap.ExampleAddNewContentEntry}"><link target="ExampleJackrabbitAddData"/></menu-item>
+        <menu-item name="ExampleJackrabbitUploadFileData" title="${uiLabelMap.ExampleJackrabbitUploadFileData}"><link target="ExampleJackrabbitUploadFileData"/></menu-item>
+        <menu-item name="ExampleJackrabbitShowUploadedFiles" title="${uiLabelMap.ExampleJackrabbitShowUploadedFiles}"><link target="ExampleJackrabbitShowUploadedFiles"/></menu-item>
+        <menu-item name="ExampleJackrabbitScanRepositoryStrukture" title="${uiLabelMap.ExampleScanRepositoryStrukture}"><link target="ExampleJackrabbitScanRepositoryStructure"/></menu-item>
+    </menu>
 </menus>

Modified: ofbiz/branches/20111205EmailHandling/framework/images/webapp/images/fieldlookup.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/images/webapp/images/fieldlookup.js?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/images/webapp/images/fieldlookup.js (original)
+++ ofbiz/branches/20111205EmailHandling/framework/images/webapp/images/fieldlookup.js Mon Mar 26 20:56:02 2012
@@ -608,8 +608,34 @@ function lookupFormAjaxRequest(formActio
     lookupId = GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP).lookupId;
     var data = jQuery("#" + form).serialize();
     data = data + "&presentation=" + GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP).presentation;
-    jQuery("#" + lookupId).load(formAction, data, function(data) {
+    /*jQuery("#" + lookupId).load(formAction, data, function(data) {
         modifySubmitButton(lookupId);
+    });*/
+    var screenletTitleBar= jQuery("#"+lookupId+" .screenlet-title-bar :visible:first");
+    jQuery.ajax({
+      url: formAction,
+      data: data,
+      beforeSend: function(jqXHR, settings) {
+        //Here we append the spinner to the lookup screenlet and it will shown till the ajax request is processed.
+        var indicator = screenletTitleBar.find("span.indicator");
+        //Check that if spinner is already in execution then don't add new spinner
+        if (indicator.length == 0) {
+          jQuery("<span class='indicator'><img src='/images/ajax-loader.gif' alt='' /></span>").appendTo(screenletTitleBar);
+        }
+      },
+      success: function(result) {
+        if (result.search(/loginform/) != -1) {
+          window.location.href = window.location.href;
+          return;
+        }
+        // Here we are removing the spinner.
+        var indicator = screenletTitleBar.find("span.indicator");
+        if (indicator != undefined) {
+          jQuery("span.indicator").remove();
+        }
+        jQuery("#" + lookupId).html(result);
+        modifySubmitButton(lookupId);
+      }
     });
 }
 
@@ -618,8 +644,33 @@ function lookupPaginationAjaxRequest(nav
     lookupContent = (GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP).contentRef);
 
     lookupId = GLOBAL_LOOKUP_REF.getReference(ACTIVATED_LOOKUP).lookupId;
-    jQuery("#" + lookupId).load(navAction, function(data) {
+    /*jQuery("#" + lookupId).load(navAction, function(data) {
         modifySubmitButton(lookupId);
+    });*/
+    var screenletTitleBar= jQuery("#"+lookupId+" .screenlet-title-bar :visible:first");
+    jQuery.ajax({
+      url: navAction,
+      beforeSend: function(jqXHR, settings) {
+        //Here we append the spinner to the lookup screenlet and it will shown till the ajax request is processed.
+        var indicator = screenletTitleBar.find("span.indicator");
+        //Check that if spinner is already in execution then don't add new spinner
+        if (indicator.length == 0) {
+          jQuery("<span class='indicator'><img src='/images/ajax-loader.gif' alt='' /></span>").appendTo(screenletTitleBar);
+        }
+      },
+      success: function(result) {
+        if (result.search(/loginform/) != -1) {
+          window.location.href = window.location.href;
+          return;
+        }
+        // Here we are removing the spinner.
+        var indicator = screenletTitleBar.find("span.indicator");
+        if (indicator != undefined) {
+          jQuery("span.indicator").remove();
+        }
+        jQuery("#" + lookupId).html(result);
+        modifySubmitButton(lookupId);
+      }
     });
 }
 
@@ -743,6 +794,7 @@ lookupDescriptionLoaded.prototype.update
   //actual server call
   var fieldName = this.params.substring(this.params.indexOf("searchValueFieldName"));
   fieldName = fieldName.substring(fieldName.indexOf("=") + 1);
+  if (jQuery("input[name=" + fieldName + "]").val()) {
   var fieldSerialized = jQuery("input[name=" + fieldName + "]", jQuery("form[name=" + this.formName + "]")).serialize();
   this.allParams = this.params + '&' + fieldSerialized + '&' + 'searchType=EQUALS';
   _fieldId = this.fieldId;
@@ -759,6 +811,7 @@ lookupDescriptionLoaded.prototype.update
       }
     }
   });
+  }
 }
     
 if(typeof String.prototype.trim !== 'function') { // Needed because IE8 does not implement trim yet

Modified: ofbiz/branches/20111205EmailHandling/framework/images/webapp/images/jquery/ui/development-bundle/themes/base/jquery.ui.autocomplete.css
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/images/webapp/images/jquery/ui/development-bundle/themes/base/jquery.ui.autocomplete.css?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/images/webapp/images/jquery/ui/development-bundle/themes/base/jquery.ui.autocomplete.css (original)
+++ ofbiz/branches/20111205EmailHandling/framework/images/webapp/images/jquery/ui/development-bundle/themes/base/jquery.ui.autocomplete.css Mon Mar 26 20:56:02 2012
@@ -21,6 +21,7 @@
  *
  * http://docs.jquery.com/UI/Menu#theming
  */
+.ui-autocomplete-loading { background: white url('../images/ui-anim_basic_16x16.gif') right center no-repeat !important; }
 .ui-menu {
  list-style:none;
  padding: 2px;

Modified: ofbiz/branches/20111205EmailHandling/framework/images/webapp/images/jquery/ui/development-bundle/themes/ui-lightness/jquery.ui.autocomplete.css
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/images/webapp/images/jquery/ui/development-bundle/themes/ui-lightness/jquery.ui.autocomplete.css?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/images/webapp/images/jquery/ui/development-bundle/themes/ui-lightness/jquery.ui.autocomplete.css (original)
+++ ofbiz/branches/20111205EmailHandling/framework/images/webapp/images/jquery/ui/development-bundle/themes/ui-lightness/jquery.ui.autocomplete.css Mon Mar 26 20:56:02 2012
@@ -21,6 +21,7 @@
  *
  * http://docs.jquery.com/UI/Menu#theming
  */
+ .ui-autocomplete-loading { background: white url('../images/ui-anim_basic_16x16.gif') right center no-repeat !important; }
 .ui-menu {
  list-style:none;
  padding: 2px;

Modified: ofbiz/branches/20111205EmailHandling/framework/images/webapp/images/selectall.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/images/webapp/images/selectall.js?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/images/webapp/images/selectall.js (original)
+++ ofbiz/branches/20111205EmailHandling/framework/images/webapp/images/selectall.js Mon Mar 26 20:56:02 2012
@@ -394,7 +394,11 @@ function ajaxAutoCompleter(areaCsvString
     var numAreas = parseInt(areaArray.length / 3);
     
     for (var i = 0; i < numAreas * 3; i = i + 3) {
-        var url = areaArray[i + 1] + "?" + areaArray[i + 2];
+        var initUrl = areaArray[i + 1];
+        if (initUrl.indexOf("?") > -1)
+            var url = initUrl + "&" + areaArray[i + 2];
+        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) {
@@ -407,6 +411,7 @@ function ajaxAutoCompleter(areaCsvString
             source: function(request, response){
                 jQuery.ajax({
                     url: url,
+                    type: "post",
                     async: false,
                     data: {term : request.term},
                     success: function(data) {
@@ -428,8 +433,7 @@ function ajaxAutoCompleter(areaCsvString
             select: function(event, ui){
                 //jQuery("#" + areaArray[0]).html(ui.item);
                 jQuery("#" + areaArray[0]).val(ui.item.value); // setting a text field  
-                jQuery("#" + areaArray[0]).trigger("lookup:changed"); // notify the field has changed
-                if (showDescription) {
+                if (showDescription && (ui.item.value != undefined && ui.item.value != '')) {
                     setLookDescription(areaArray[0], ui.item.label, areaArray[2], formName, showDescription)
                 }
             }
@@ -726,26 +730,33 @@ function submitFormEnableButton(button)
     button.value = button.value.substring(0, button.value.length - 1);
 }
 
-function expandAll(expanded) {
-  var divs,divs1,i,j,links,groupbody;
-
-  divs=document.getElementsByTagName('div');
-  for(i=0;i<divs.length;i++) {
-    if(/fieldgroup$/.test(divs[i].className)) {
-      links=divs[i].getElementsByTagName('a');
-      if(links.length>0) {
-        divs1=divs[i].getElementsByTagName('div');
-        for(j=0;j<divs1.length;j++){
-          if(/fieldgroup-body/.test(divs1[j].className)) {
-            groupbody=divs1[j];
-          }
+/**
+ * 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
+ */
+function expandAllP(bool, portalPortletId) {
+    jQuery('#scrlt_'+portalPortletId+' .fieldgroup').each(function() {
+        var titleBar = $(this).children('.fieldgroup-title-bar'), body = $(this).children('.fieldgroup-body');
+        if (titleBar.children().length > 0 && body.is(':visible') != bool) {
+            toggleCollapsiblePanel(titleBar.find('a'), body.attr('id'), 'expand', 'collapse');
         }
-        if(jQuery(groupbody).is(':visible') != expanded) {
-          toggleCollapsiblePanel(links[0], groupbody.id, 'expand', 'collapse');
+    });
+}
+
+/**
+ * Expands or collapses all groups of the page
+ *
+ * @param bool <code>true</code> to expand, <code>false</code> otherwise
+ */
+function expandAll(bool) {
+    jQuery('.fieldgroup').each(function() {
+        var titleBar = $(this).children('.fieldgroup-title-bar'), body = $(this).children('.fieldgroup-body');
+        if (titleBar.children().length > 0 && body.is(':visible') != bool) {
+            toggleCollapsiblePanel(titleBar.find('a'), body.attr('id'), 'expand', 'collapse');
         }
-      }
-    }
-  }
+    });
 }
 
 //calls ajax request for storing user layout preferences

Propchange: ofbiz/branches/20111205EmailHandling/framework/jcr/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Mar 26 20:56:02 2012
@@ -0,0 +1 @@
+build