You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by er...@apache.org on 2012/03/26 22:56:30 UTC

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

Modified: ofbiz/branches/20111205EmailHandling/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelInfo.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelInfo.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelInfo.java (original)
+++ ofbiz/branches/20111205EmailHandling/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelInfo.java Mon Mar 26 20:56:02 2012
@@ -35,7 +35,7 @@ public class LabelInfo {
     protected String fileName = "";
     protected Map<String, LabelValue> labelValues = FastMap.newInstance();
 
-    public LabelInfo(String labelKey, String labelKeyComment, String fileName, String localeStr, String labelValue, String labelComment) throws GeneralException {
+    public LabelInfo(String labelKey, String labelKeyComment, String fileName, String localeStr, String labelValue, String labelComment) {
         this.labelKey = labelKey;
         this.labelKeyComment = labelKeyComment;
         this.fileName = fileName;
@@ -85,7 +85,9 @@ public class LabelInfo {
                     labelValues.remove(localeStr);
                 }
             } else {
-                Debug.logWarning("Already found locale " + localeStr + " for label " + labelKey + " into the file " + fileName, module);
+                if (Debug.warningOn()) {
+                    Debug.logWarning("Already found locale " + localeStr + " for label " + labelKey + " into the file " + fileName, module);
+                }
                 isDuplicatedLocales = true;
             }
         }

Modified: ofbiz/branches/20111205EmailHandling/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelManagerFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelManagerFactory.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelManagerFactory.java (original)
+++ ofbiz/branches/20111205EmailHandling/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelManagerFactory.java Mon Mar 26 20:56:02 2012
@@ -60,7 +60,7 @@ public class LabelManagerFactory {
     protected Set<String> localesFound = new TreeSet<String>();
     protected List<LabelInfo> duplicatedLocalesLabelsList = FastList.newInstance();
 
-    public static synchronized LabelManagerFactory getInstance() throws GeneralException, IOException {
+    public static synchronized LabelManagerFactory getInstance() throws IOException {
         if (componentNamesFound == null) {
             loadComponentNames();
         }
@@ -120,7 +120,9 @@ public class LabelManagerFactory {
             if (UtilValidate.isNotEmpty(fileName) && !fileName.equals(fileInfo.getFileName())) {
                 continue;
             }
-            Debug.logInfo("Current file : " + fileInfo.getFileName(), module);
+            if (Debug.infoOn()) {
+                Debug.logInfo("Current file : " + fileInfo.getFileName(), module);
+            }
             Document resourceDocument = UtilXml.readXmlDocument(fileInfo.file.toURI().toURL(), false);
             Element resourceElem = resourceDocument.getDocumentElement();
             String labelKeyComment = "";
@@ -132,7 +134,12 @@ public class LabelManagerFactory {
                     for (Node valueNode : UtilXml.childNodeList(propertyElem.getFirstChild())) {
                         if (valueNode instanceof Element) {
                             Element valueElem = (Element) valueNode;
+                            // Support old way of specifying xml:lang value.
+                            // Old way: en_AU, new way: en-AU
                             String localeName = valueElem.getAttribute("xml:lang");
+                            if( localeName.contains("_")) {
+                                localeName = localeName.replace('_', '-');
+                            }
                             String labelValue = StringUtil.defaultWebEncoder.canonicalize(UtilXml.nodeValue(valueElem.getFirstChild()));
                             LabelInfo label = labels.get(labelKey + keySeparator + fileInfo.getFileName());
 
@@ -208,8 +215,10 @@ public class LabelManagerFactory {
                 } else {
                     label.setLabelKeyComment(keyComment);
                 }
-                label.setLabelValue(localeName, localeValue, localeComment, true);
-                notEmptyLabels++;
+                if (label != null) {
+                    label.setLabelValue(localeName, localeValue, localeComment, true);
+                    notEmptyLabels++;
+                }
             }
         }
         return notEmptyLabels;

Modified: ofbiz/branches/20111205EmailHandling/framework/webtools/src/org/ofbiz/webtools/labelmanager/SaveLabelsToXmlFile.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/webtools/src/org/ofbiz/webtools/labelmanager/SaveLabelsToXmlFile.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/webtools/src/org/ofbiz/webtools/labelmanager/SaveLabelsToXmlFile.java (original)
+++ ofbiz/branches/20111205EmailHandling/framework/webtools/src/org/ofbiz/webtools/labelmanager/SaveLabelsToXmlFile.java Mon Mar 26 20:56:02 2012
@@ -113,6 +113,7 @@ public class SaveLabelsToXmlFile {
                 Document resourceDocument = UtilXml.makeEmptyXmlDocument("resource");
                 Element resourceElem = resourceDocument.getDocumentElement();
                 resourceElem.setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
+                resourceElem.setAttribute("xsi:noNamespaceSchemaLocation","http://ofbiz.apache.org/dtds/ofbiz-properties.xsd");
                 for (String labelKey : labelsList) {
                     LabelInfo labelInfo = labels.get(labelKey);
                     if (!(labelInfo.getFileName().equalsIgnoreCase(fileName))) {
@@ -135,7 +136,7 @@ public class SaveLabelsToXmlFile {
                             valueString = StringEscapeUtils.unescapeHtml(valueString);
                             Element valueElem = UtilXml.addChildElementValue(propertyElem, "value", valueString, resourceDocument);
                             valueElem.setAttribute("xml:lang", localeFound);
-                            if (valueString.trim().length() == 0) {
+                            if (valueString.trim().isEmpty()) {
                                 valueElem.setAttribute("xml:space", "preserve");
                             }
                             if (UtilValidate.isNotEmpty(labelValue.getLabelComment())) {

Modified: ofbiz/branches/20111205EmailHandling/framework/webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.groovy?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.groovy (original)
+++ ofbiz/branches/20111205EmailHandling/framework/webtools/webapp/webtools/WEB-INF/actions/datafile/viewdatafile.groovy Mon Mar 26 20:56:02 2012
@@ -52,10 +52,15 @@ catch (java.net.MalformedURLException e)
 
 definitionNames = null;
 if (definitionUrl) {
-    ModelDataFileReader reader = ModelDataFileReader.getModelDataFileReader(definitionUrl);
-    if (reader) {
-        definitionNames = ((Collection)reader.getDataFileNames()).iterator();
-        context.put("definitionNames", definitionNames);
+    try {
+        ModelDataFileReader reader = ModelDataFileReader.getModelDataFileReader(definitionUrl);
+        if (reader) {
+            definitionNames = ((Collection)reader.getDataFileNames()).iterator();
+            context.put("definitionNames", definitionNames);
+        }
+    }
+    catch (Exception e) {
+        messages.add(e.getMessage());
     }
 }
 

Modified: ofbiz/branches/20111205EmailHandling/framework/webtools/webapp/webtools/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/webtools/webapp/webtools/WEB-INF/controller.xml?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/webtools/webapp/webtools/WEB-INF/controller.xml (original)
+++ ofbiz/branches/20111205EmailHandling/framework/webtools/webapp/webtools/WEB-INF/controller.xml Mon Mar 26 20:56:02 2012
@@ -59,11 +59,6 @@ under the License.
         <response name="error" type="none"/>
         <response name="success" type="none"/>
     </request-map>
-    <request-map uri="runService">
-        <event type="java" path="org.ofbiz.webapp.event.CoreEvents" invoke="runService"/>
-        <response name="success" type="view" value="main"/>
-        <response name="error" type="view" value="main"/>
-    </request-map>
 
     <request-map uri="ping">
         <event type="service" invoke="ping"/>
@@ -316,6 +311,13 @@ under the License.
         <response name="sync_success" type="view" value="serviceResult"/>
         <response name="error" type="view" value="scheduleJob"/>
     </request-map>
+    <request-map uri="scheduleServiceSync">
+        <security https="true" auth="true"/>
+        <event type="java" path="org.ofbiz.webapp.event.CoreEvents" invoke="scheduleService"/>
+        <response name="success" type="view" value="serviceResult"/>
+        <response name="sync_success" type="view" value="serviceResult"/>
+        <response name="error" type="view" value="runService"/>
+    </request-map>
     <request-map uri="serviceResult">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="serviceResult"/>

Modified: ofbiz/branches/20111205EmailHandling/framework/webtools/webapp/webtools/entity/EntityExportAll.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/webtools/webapp/webtools/entity/EntityExportAll.ftl?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/webtools/webapp/webtools/entity/EntityExportAll.ftl (original)
+++ ofbiz/branches/20111205EmailHandling/framework/webtools/webapp/webtools/entity/EntityExportAll.ftl Mon Mar 26 20:56:02 2012
@@ -29,6 +29,7 @@ under the License.
 <hr />
 <form method="post" action="<@o...@ofbizUrl>">
     ${uiLabelMap.WebtoolsOutputDirectory}: <input type="text" size="60" name="outpath" value="${outpath?if_exists}" /><br />
+    ${uiLabelMap.CommonFromDate}: <@htmlTemplate.renderDateTimeField name="fromDate" event="" action="" className="" alert="" title="Format: yyyy-MM-dd HH:mm:ss.SSS" value="" size="25" maxlength="30" id="fromDate" dateType="date" shortDateInput=false timeDropdownParamName="" defaultDateTimeString="" localizedIconTitle="" timeDropdown="" timeHourName="" classString="" hour1="" hour2="" timeMinutesName="" minutes="" isTwelveHour="" ampmName="" amSelected="" pmSelected="" compositeType="" formName=""/><br/>
     ${uiLabelMap.WebtoolsTimeoutSeconds}: <input type="text" size="6" value="${txTimeout?default('7200')}" name="txTimeout"/><br />
     <br />
     <input type="submit" value="${uiLabelMap.WebtoolsExport}" />

Modified: ofbiz/branches/20111205EmailHandling/framework/webtools/widget/ServiceScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/webtools/widget/ServiceScreens.xml?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/webtools/widget/ServiceScreens.xml (original)
+++ ofbiz/branches/20111205EmailHandling/framework/webtools/widget/ServiceScreens.xml Mon Mar 26 20:56:02 2012
@@ -167,7 +167,7 @@ under the License.
                     <decorator-section name="body">
                         <screenlet title="${uiLabelMap.PageTitleScheduleJob}">
                             <platform-specific>
-                                <html><html-template location="component://webtools/webapp/webtools/service/setServiceParameter.ftl"/></html>
+                                <html><html-template location="component://webtools/webapp/webtools/service/setServiceParameterSync.ftl"/></html>
                             </platform-specific>
                         </screenlet>
                     </decorator-section>

Modified: ofbiz/branches/20111205EmailHandling/framework/widget/config/conditional.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/widget/config/conditional.xml?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/widget/config/conditional.xml (original)
+++ ofbiz/branches/20111205EmailHandling/framework/widget/config/conditional.xml Mon Mar 26 20:56:02 2012
@@ -184,7 +184,7 @@
     <property key="up_thru_day">
         <value xml:lang="ar">يحتوي اليوم</value>
         <value xml:lang="de">bis Tagesende</value>
-        <value xml:lang="en">Up Thru Day</value>
+        <value xml:lang="en">Up Through Day</value>
         <value xml:lang="es">Hasta el día</value>
         <value xml:lang="fr">Inclus ce jour</value>
         <value xml:lang="it">Fino al giorno</value>

Modified: ofbiz/branches/20111205EmailHandling/framework/widget/dtd/widget-form.xsd
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/widget/dtd/widget-form.xsd?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/widget/dtd/widget-form.xsd (original)
+++ ofbiz/branches/20111205EmailHandling/framework/widget/dtd/widget-form.xsd Mon Mar 26 20:56:02 2012
@@ -356,6 +356,7 @@ under the License.
     <xs:element name="sort-field">
         <xs:complexType>
             <xs:attributeGroup ref="attlist.sort-field"/>
+            <xs:attribute name="position" type="xs:positiveInteger"/>
         </xs:complexType>
     </xs:element>
     <xs:attributeGroup name="attlist.sort-field">
@@ -932,9 +933,7 @@ under the License.
         </xs:complexType>
     </xs:element>
     <xs:attributeGroup name="attlist.image">
-        <xs:attribute type="xs:nonNegativeInteger" name="border" default="0"/>
-        <xs:attribute type="xs:positiveInteger" name="width"/>
-        <xs:attribute type="xs:positiveInteger" name="height"/>
+        <xs:attribute type="xs:string" name="style"/>
         <xs:attribute type="xs:string" name="value"/>
         <xs:attribute type="xs:string" name="default-value"/>
         <xs:attribute type="xs:string" name="description"/>
@@ -1992,4 +1991,8 @@ under the License.
     <xs:attributeGroup name="attlist.select-field">
         <xs:attribute type="xs:string" name="field-name" use="required"/>
     </xs:attributeGroup>
+
+    <xs:element name="call-parent-actions" substitutionGroup="AllActions">
+        <xs:complexType/>
+    </xs:element>
 </xs:schema>

Modified: ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/ModelWidgetAction.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/ModelWidgetAction.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/ModelWidgetAction.java (original)
+++ ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/ModelWidgetAction.java Mon Mar 26 20:56:02 2012
@@ -34,12 +34,10 @@ import javolution.util.FastList;
 import javolution.util.FastMap;
 
 import org.w3c.dom.Element;
-import org.codehaus.groovy.runtime.InvokerHelper;
-import org.ofbiz.base.util.BshUtil;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.GeneralException;
-import org.ofbiz.base.util.GroovyUtil;
 import org.ofbiz.base.util.ObjectType;
+import org.ofbiz.base.util.ScriptUtil;
 import org.ofbiz.base.util.StringUtil;
 import org.ofbiz.base.util.UtilGenerics;
 import org.ofbiz.base.util.UtilProperties;
@@ -54,6 +52,7 @@ import org.ofbiz.entity.finder.ByAndFind
 import org.ofbiz.entity.finder.ByConditionFinder;
 import org.ofbiz.entity.finder.EntityFinderUtil;
 import org.ofbiz.entity.finder.PrimaryKeyFinder;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.minilang.MiniLangException;
 import org.ofbiz.minilang.SimpleMethod;
 import org.ofbiz.minilang.method.MethodContext;
@@ -366,9 +365,9 @@ public abstract class ModelWidgetAction 
 
             String value = null;
             if (noLocale) {
-                value = UtilProperties.getPropertyValue(resource, property);
+                value = EntityUtilProperties.getPropertyValue(resource, property, WidgetWorker.getDelegator(context));
             } else {
-                value = UtilProperties.getMessage(resource, property, locale);
+                value = EntityUtilProperties.getMessage(resource, property, locale, WidgetWorker.getDelegator(context));
             }
             if (UtilValidate.isEmpty(value)) {
                 value = this.defaultExdr.expandString(context);
@@ -390,7 +389,6 @@ public abstract class ModelWidgetAction 
     }
 
     public static class Script extends ModelWidgetAction {
-        protected static final Object[] EMPTY_ARGS = {};
         protected String location;
         protected String method;
 
@@ -403,24 +401,7 @@ public abstract class ModelWidgetAction 
 
         @Override
         public void runAction(Map<String, Object> context) throws GeneralException {
-            if (location.endsWith(".bsh")) {
-                try {
-                    BshUtil.runBshAtLocation(location, context);
-                } catch (GeneralException e) {
-                    throw new GeneralException("Error running BSH script at location [" + location + "]", e);
-                }
-            } else if (location.endsWith(".groovy")) {
-                try {
-                    groovy.lang.Script script = InvokerHelper.createScript(GroovyUtil.getScriptClassFromLocation(location), GroovyUtil.getBinding(context));
-                    if (UtilValidate.isEmpty(method)) {
-                        script.run();
-                    } else {
-                        script.invokeMethod(method, EMPTY_ARGS);
-                    }
-                } catch (GeneralException e) {
-                    throw new GeneralException("Error running Groovy script at location [" + location + "]", e);
-                }
-            } else if (location.endsWith(".xml")) {
+            if (location.endsWith(".xml")) {
                 Map<String, Object> localContext = FastMap.newInstance();
                 localContext.putAll(context);
                 DispatchContext ctx = WidgetWorker.getDispatcher(context).getDispatchContext();
@@ -432,7 +413,7 @@ public abstract class ModelWidgetAction 
                     throw new GeneralException("Error running simple method at location [" + location + "]", e);
                 }
             } else {
-                throw new GeneralException("For widget script actions the script type is not yet supported for location: [" + location + "]");
+                ScriptUtil.executeScript(this.location, this.method, context);
             }
         }
     }

Modified: ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/WidgetWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/WidgetWorker.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/WidgetWorker.java (original)
+++ ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/WidgetWorker.java Mon Mar 26 20:56:02 2012
@@ -20,7 +20,10 @@ package org.ofbiz.widget;
 
 import java.io.IOException;
 import java.io.StringWriter;
+import java.io.UnsupportedEncodingException;
 import java.math.BigDecimal;
+import java.net.URLEncoder;
+import java.nio.charset.Charset;
 import java.text.DateFormat;
 import java.util.Map;
 import java.util.TimeZone;
@@ -104,10 +107,10 @@ public class WidgetWorker {
                     parameterValue = parameter.getValue();
                 } else {
                     Object parameterObject = parameter.getValue();
-                    
+
                     // skip null values
                     if (parameterObject == null) continue;
-                    
+
                     if (parameterObject instanceof String[]) {
                         // it's probably a String[], just get the first value
                         String[] parameterArray = (String[]) parameterObject;
@@ -118,7 +121,7 @@ public class WidgetWorker {
                         parameterValue = parameterObject.toString();
                     }
                 }
-                
+
                 if (needsAmp) {
                     externalWriter.append("&amp;");
                 } else {
@@ -339,9 +342,14 @@ public class WidgetWorker {
 
         public String getValue(Map<String, Object> context) {
             if (this.value != null) {
-                return this.value.expandString(context);
+                try {
+                    return URLEncoder.encode(this.value.expandString(context), Charset.forName("UTF-8").displayName());
+                } catch (UnsupportedEncodingException e) {
+                    Debug.logError(e, module);
+                    return this.value.expandString(context);
+                }
             }
-            
+
             Object retVal = null;
             if (this.fromField != null && this.fromField.get(context) != null) {
                 retVal = this.fromField.get(context);
@@ -352,7 +360,7 @@ public class WidgetWorker {
             if (retVal != null) {
                 TimeZone timeZone = (TimeZone) context.get("timeZone");
                 if (timeZone == null) timeZone = TimeZone.getDefault();
-                
+
                 String returnValue = null;
                 // format string based on the user's time zone (not locale because these are parameters)
                 if (retVal instanceof Double || retVal instanceof Float || retVal instanceof BigDecimal) {
@@ -370,7 +378,11 @@ public class WidgetWorker {
                     DateFormat df = UtilDateTime.toDateTimeFormat("EEE MMM dd hh:mm:ss z yyyy", timeZone, null);
                     returnValue = df.format((java.util.Date) retVal);
                 } else {
-                    returnValue = retVal.toString();
+                    try {
+                        returnValue = URLEncoder.encode(retVal.toString(), Charset.forName("UTF-8").displayName());
+                    } catch (UnsupportedEncodingException e) {
+                        Debug.logError(e, module);
+                    }
                 }
                 return returnValue;
             } else {
@@ -401,7 +413,7 @@ public class WidgetWorker {
 
     /** Returns the script location based on a script combined name:
      * <code>location#methodName</code>.
-     * 
+     *
      * @param combinedName The combined location/method name
      * @return The script location
      */
@@ -416,7 +428,7 @@ public class WidgetWorker {
     /** Returns the script method name based on a script combined name:
      * <code>location#methodName</code>. Returns <code>null</code> if
      * no method name is found.
-     * 
+     *
      * @param combinedName The combined location/method name
      * @return The method name or <code>null</code>
      */

Modified: ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java (original)
+++ ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java Mon Mar 26 20:56:02 2012
@@ -843,13 +843,11 @@ public class MacroFormRenderer implement
             options.append(key);
             options.append("'");
             options.append(",'description':'");
-            String description = encode(optionValue.getDescription(), modelFormField, context);
-            String unescaped = StringEscapeUtils.unescapeHtml(description);
-            if (textSize > 0 && unescaped.length() > textSize ) {
-                String reduced = unescaped.substring(0, textSize - 8) + "..." + unescaped.substring(unescaped.length() - 5);
-                description = StringEscapeUtils.escapeJavaScript(StringEscapeUtils.escapeHtml(reduced));
+            String description = optionValue.getDescription();
+            if (textSize > 0 && description.length() > textSize ) {
+                description = description.substring(0, textSize - 8) + "..." + description.substring(description.length() - 5);
             }
-            options.append(description);
+            options.append(encode(description, modelFormField, context));
 
             if (UtilValidate.isNotEmpty(currentValueList)) {
                 options.append("'");
@@ -1424,7 +1422,7 @@ public class MacroFormRenderer implement
         Iterator<ModelFormField> submitFields = modelForm.getMultiSubmitFields().iterator();
         while (submitFields.hasNext()) {
             ModelFormField submitField = submitFields.next();
-            if (submitField != null) {
+            if (submitField != null && submitField.shouldUse(context)) {
 
                 // Threw this in that as a hack to keep the submit button from expanding the first field
                 // Needs a more rugged solution
@@ -2258,7 +2256,7 @@ public class MacroFormRenderer implement
         if (questionIndex == -1) {
             result += sessionId;
         } else {
-            result.replace("?", sessionId + "?");
+            result = result.replace("?", sessionId + "?");
         }
         return result;
     }
@@ -2622,20 +2620,19 @@ public class MacroFormRenderer implement
 
     public void renderImageField(Appendable writer, Map<String, Object> context, ImageField imageField) throws IOException {
         ModelFormField modelFormField = imageField.getModelFormField();
-
-        String border = Integer.toString(imageField.getBorder());
         String value = modelFormField.getEntry(context, imageField.getValue(context));
-        String width = "";
-        String height = "";
         String description = imageField.getDescription(context);
         String alternate = imageField.getAlternate(context);
+        String style = imageField.getStyle(context);
 
         if(UtilValidate.isEmpty(description)){
             description = imageField.getModelFormField().getTitle(context);
         }
+
         if(UtilValidate.isEmpty(alternate)){
             alternate = description;
         }
+
         if (UtilValidate.isNotEmpty(value)) {
             if (!value.startsWith("http")) {
                 StringBuilder buffer = new StringBuilder();
@@ -2647,14 +2644,6 @@ public class MacroFormRenderer implement
             value = "";
         }
 
-        if (imageField.getWidth() != null) {
-            width = Integer.toString(imageField.getWidth());
-        }
-
-        if (imageField.getHeight() != null) {
-            height = Integer.toString(imageField.getHeight());
-        }
-
         String event = modelFormField.getEvent();
         String action = modelFormField.getAction(context);
 
@@ -2666,12 +2655,8 @@ public class MacroFormRenderer implement
         sr.append(encode(description, modelFormField, context));
         sr.append("\" alternate=\"");
         sr.append(encode(alternate, modelFormField, context));
-        sr.append("\" border=\"");
-        sr.append(border);
-        sr.append("\" width=\"");
-        sr.append(width);
-        sr.append("\" height=\"");
-        sr.append(height);
+        sr.append("\" style=\"");
+        sr.append(style);
         sr.append("\" event=\"");
         sr.append(event==null?"":event);
         sr.append("\" action=\"");

Modified: ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/form/ModelForm.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/form/ModelForm.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/form/ModelForm.java (original)
+++ ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/form/ModelForm.java Mon Mar 26 20:56:02 2012
@@ -78,6 +78,7 @@ public class ModelForm extends ModelWidg
     protected String formLocation;
     protected String parentFormName;
     protected String parentFormLocation;
+    protected ModelForm parentModelForm;
     protected String type;
     protected FlexibleStringExpander target;
     protected String targetType;
@@ -132,7 +133,7 @@ public class ModelForm extends ModelWidg
     protected List<AltTarget> altTargets = FastList.newInstance();
     protected List<AutoFieldsService> autoFieldsServices = FastList.newInstance();
     protected List<AutoFieldsEntity> autoFieldsEntities = FastList.newInstance();
-    protected List<String> sortOrderFields = FastList.newInstance();
+    protected List<SortField> sortOrderFields = FastList.newInstance();
     protected List<AltRowStyle> altRowStyles = FastList.newInstance();
 
     /** This List will contain one copy of each field for each field name in the order
@@ -261,6 +262,7 @@ public class ModelForm extends ModelWidg
             }
 
             if (parent != null) {
+                this.parentModelForm = parent;
                 this.type = parent.type;
                 this.target = parent.target;
                 this.containerId = parent.containerId;
@@ -538,7 +540,8 @@ public class ModelForm extends ModelWidg
                 String tagName = sortFieldElement.getTagName();
                 if (tagName.equals("sort-field")) {
                     String fieldName = sortFieldElement.getAttribute("name");
-                    this.sortOrderFields.add(fieldName);
+                    String position = sortFieldElement.getAttribute("position");
+                    this.sortOrderFields.add(new SortField(fieldName, position));
                     this.fieldGroupMap.put(fieldName, lastFieldGroup);
                 } else if (tagName.equals("banner")) {
                     Banner thisBanner = new Banner(sortFieldElement, this);
@@ -559,7 +562,8 @@ public class ModelForm extends ModelWidg
         // reorder fields according to sort order
         if (sortOrderFields.size() > 0) {
             List<ModelFormField> sortedFields = FastList.newInstance();
-            for (String fieldName: this.sortOrderFields) {
+            for (SortField sortField: this.sortOrderFields) {
+                String fieldName = sortField.getFieldName();
                 if (UtilValidate.isEmpty(fieldName)) {
                     continue;
                 }
@@ -570,6 +574,9 @@ public class ModelForm extends ModelWidg
                     ModelFormField modelFormField = fieldIter.next();
                     if (fieldName.equals(modelFormField.getName())) {
                         // matched the name; remove from the original last and add to the sorted list
+                        if (UtilValidate.isNotEmpty(sortField.getPosition())) {
+                            modelFormField.setPosition(sortField.getPosition());
+                        }
                         fieldIter.remove();
                         sortedFields.add(modelFormField);
                     }
@@ -1892,6 +1899,10 @@ public class ModelForm extends ModelWidg
         return this.parentFormLocation;
     }
 
+    public ModelForm getParentModelForm() {
+        return parentModelForm;
+    }
+
     public String getDefaultEntityName() {
         return this.defaultEntityName;
     }
@@ -2894,6 +2905,35 @@ public class ModelForm extends ModelWidg
         }
     }
 
+    public static class SortField {
+        protected String fieldName;
+        protected Integer position = null;
+
+        public SortField(String name, String position) {
+            this.fieldName = name;
+            if (UtilValidate.isNotEmpty(position)){
+                Integer posParam = null;
+                try {
+                    posParam = Integer.valueOf(position);
+                }
+                catch(Exception e) {/* just ignore the exception*/}
+                this.position = posParam;
+            }
+        }
+
+        public SortField(String name) {
+            this(name, null);
+        }
+
+        public String getFieldName() {
+            return this.fieldName;
+        }
+
+        public Integer getPosition() {
+            return this.position;
+        }
+    }
+
     public static interface FieldGroupBase {}
 
     public static class FieldGroup implements FieldGroupBase {
@@ -2923,7 +2963,7 @@ public class ModelForm extends ModelWidg
                 }
 
                 for (Element sortFieldElement: UtilXml.childElementList(sortOrderElement, "sort-field")) {
-                    modelForm.sortOrderFields.add(sortFieldElement.getAttribute("name"));
+                    modelForm.sortOrderFields.add(new SortField(sortFieldElement.getAttribute("name"),sortFieldElement.getAttribute("position")));
                     modelForm.fieldGroupMap.put(sortFieldElement.getAttribute("name"), this);
                 }
             } else {

Modified: ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java (original)
+++ ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java Mon Mar 26 20:56:02 2012
@@ -31,12 +31,10 @@ import java.util.regex.PatternSyntaxExce
 import javolution.util.FastList;
 import javolution.util.FastMap;
 
-import org.codehaus.groovy.runtime.InvokerHelper;
-import org.ofbiz.base.util.BshUtil;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.GeneralException;
-import org.ofbiz.base.util.GroovyUtil;
 import org.ofbiz.base.util.ObjectType;
+import org.ofbiz.base.util.ScriptUtil;
 import org.ofbiz.base.util.UtilGenerics;
 import org.ofbiz.base.util.UtilProperties;
 import org.ofbiz.base.util.UtilValidate;
@@ -47,6 +45,7 @@ import org.ofbiz.entity.finder.ByAndFind
 import org.ofbiz.entity.finder.ByConditionFinder;
 import org.ofbiz.entity.finder.EntityFinderUtil;
 import org.ofbiz.entity.finder.PrimaryKeyFinder;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.minilang.MiniLangException;
 import org.ofbiz.minilang.SimpleMethod;
 import org.ofbiz.minilang.method.MethodContext;
@@ -92,6 +91,8 @@ public abstract class ModelFormAction {
                 actions.add(new EntityAnd(modelForm, actionElement));
             } else if ("entity-condition".equals(actionElement.getNodeName())) {
                 actions.add(new EntityCondition(modelForm, actionElement));
+            } else if ("call-parent-actions".equals(actionElement.getNodeName())) {
+                actions.add(new CallParentActions(modelForm, actionElement));
             } else {
                 throw new IllegalArgumentException("Action element not supported with name: " + actionElement.getNodeName());
             }
@@ -247,9 +248,9 @@ public abstract class ModelFormAction {
 
             String value = null;
             if (noLocale) {
-                value = UtilProperties.getPropertyValue(resource, property);
+                value = EntityUtilProperties.getPropertyValue(resource, property, WidgetWorker.getDelegator(context));
             } else {
-                value = UtilProperties.getMessage(resource, property, locale);
+                value = EntityUtilProperties.getMessage(resource, property, locale, WidgetWorker.getDelegator(context));
             }
             if (UtilValidate.isEmpty(value)) {
                 value = this.defaultExdr.expandString(context);
@@ -272,7 +273,6 @@ public abstract class ModelFormAction {
     }
 
     public static class Script extends ModelFormAction {
-        protected static final Object[] EMPTY_ARGS = {};
         protected String location;
         protected String method;
 
@@ -285,28 +285,7 @@ public abstract class ModelFormAction {
 
         @Override
         public void runAction(Map<String, Object> context) {
-            if (location.endsWith(".bsh")) {
-                try {
-                    BshUtil.runBshAtLocation(location, context);
-                } catch (GeneralException e) {
-                    String errMsg = "Error running BSH script at location [" + location + "]: " + e.toString();
-                    Debug.logError(e, errMsg, module);
-                    throw new IllegalArgumentException(errMsg);
-                }
-            } else if (location.endsWith(".groovy")) {
-                try {
-                    groovy.lang.Script script = InvokerHelper.createScript(GroovyUtil.getScriptClassFromLocation(location), GroovyUtil.getBinding(context));
-                    if (UtilValidate.isEmpty(method)) {
-                        script.run();
-                    } else {
-                        script.invokeMethod(method, EMPTY_ARGS);
-                    }
-                } catch (GeneralException e) {
-                    String errMsg = "Error running Groovy script at location [" + location + "]: " + e.toString();
-                    Debug.logError(e, errMsg, module);
-                    throw new IllegalArgumentException(errMsg);
-                }
-            } else if (location.endsWith(".xml")) {
+            if (location.endsWith(".xml")) {
                 Map<String, Object> localContext = FastMap.newInstance();
                 localContext.putAll(context);
                 DispatchContext ctx = this.modelForm.dispatchContext;
@@ -318,7 +297,7 @@ public abstract class ModelFormAction {
                     throw new IllegalArgumentException("Error running simple method at location [" + location + "]", e);
                 }
             } else {
-                throw new IllegalArgumentException("For screen script actions the script type is not yet support for location:" + location);
+                ScriptUtil.executeScript(this.location, this.method, context);
             }
         }
     }
@@ -371,7 +350,12 @@ public abstract class ModelFormAction {
             try {
                 Map<String, Object> serviceContext = null;
                 if (autoFieldMapBool) {
-                    serviceContext = WidgetWorker.getDispatcher(context).getDispatchContext().makeValidContext(serviceNameExpanded, ModelService.IN_PARAM, context);
+                    if (! "true".equals(autoFieldMapString)) {
+                        Map<String, Object> autoFieldMap = UtilGenerics.checkMap(context.get(autoFieldMapString));
+                        serviceContext = WidgetWorker.getDispatcher(context).getDispatchContext().makeValidContext(serviceNameExpanded, ModelService.IN_PARAM, autoFieldMap);
+                    } else {
+                        serviceContext = WidgetWorker.getDispatcher(context).getDispatchContext().makeValidContext(serviceNameExpanded, ModelService.IN_PARAM, context);
+                    }
                 } else {
                     serviceContext = new HashMap<String, Object>();
                 }
@@ -540,4 +524,43 @@ public abstract class ModelFormAction {
             }
         }
     }
+
+    public static class CallParentActions extends ModelFormAction {
+        protected static enum ActionsKind {
+            ACTIONS,
+            ROW_ACTIONS
+        };
+
+        protected ActionsKind kind;
+
+        public CallParentActions(ModelForm modelForm, Element callParentActionsElement) {
+            super(modelForm, callParentActionsElement);
+            String parentName = callParentActionsElement.getParentNode().getNodeName();
+            if ("actions".equals(parentName)) {
+                kind = ActionsKind.ACTIONS;
+            } else if ("row-actions".equals(parentName)) {
+                kind = ActionsKind.ROW_ACTIONS;
+            } else {
+                throw new IllegalArgumentException("Action element not supported for call-parent-actions : " + parentName);
+            }
+
+            ModelForm parentModel = modelForm.getParentModelForm();
+            if (parentModel == null) {
+                throw new IllegalArgumentException("call-parent-actions can only be used with form extending another form");
+            }
+        }
+
+        @Override
+        public void runAction(Map<String, Object> context) {
+            ModelForm parentModel = modelForm.getParentModelForm();
+            switch (kind) {
+                case ACTIONS:
+                    parentModel.runFormActions(context);
+                    break;
+                case ROW_ACTIONS:
+                    ModelFormAction.runSubActions(parentModel.rowActions, context);
+                    break;
+            }
+        }
+    }
 }

Modified: ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java (original)
+++ ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java Mon Mar 26 20:56:02 2012
@@ -3653,14 +3653,12 @@ public class ModelFormField {
     }
 
     public static class ImageField extends FieldInfo {
-        protected int border = 0;
-        protected Integer width;
-        protected Integer height;
         protected FlexibleStringExpander defaultValue;
         protected FlexibleStringExpander value;
         protected SubHyperlink subHyperlink;
         protected FlexibleStringExpander description;
         protected FlexibleStringExpander alternate;
+        protected FlexibleStringExpander style;
 
         protected ImageField() {
             super();
@@ -3679,39 +3677,7 @@ public class ModelFormField {
             this.setValue(element.getAttribute("value"));
             this.setDescription(element.getAttribute("description"));
             this.setAlternate(element.getAttribute("alternate"));
-
-            String borderStr = element.getAttribute("border");
-            try {
-                border = Integer.parseInt(borderStr);
-            } catch (Exception e) {
-                if (UtilValidate.isNotEmpty(borderStr)) {
-                    Debug.logError("Could not parse the border value of the text element: [" + borderStr + "], setting to the default of " + border, module);
-                }
-            }
-
-            String widthStr = element.getAttribute("width");
-            try {
-                width = Integer.valueOf(widthStr);
-            } catch (Exception e) {
-                width = null;
-                if (UtilValidate.isNotEmpty(widthStr)) {
-                    Debug.logError(
-                        "Could not parse the size value of the text element: [" + widthStr + "], setting to null; default of no width will be used",
-                        module);
-                }
-            }
-
-            String heightStr = element.getAttribute("height");
-            try {
-                height = Integer.valueOf(heightStr);
-            } catch (Exception e) {
-                height = null;
-                if (UtilValidate.isNotEmpty(heightStr)) {
-                    Debug.logError(
-                        "Could not parse the size value of the text element: [" + heightStr + "], setting to null; default of no height will be used",
-                        module);
-                }
-            }
+            this.setStyle(element.getAttribute("style"));
 
             Element subHyperlinkElement = UtilXml.firstChildElement(element, "sub-hyperlink");
             if (subHyperlinkElement != null) {
@@ -3738,16 +3704,6 @@ public class ModelFormField {
         public void setSubHyperlink(SubHyperlink newSubHyperlink) {
             this.subHyperlink = newSubHyperlink;
         }
-        public Integer getWidth() {
-            return width;
-        }
-        public Integer getHeight() {
-            return height;
-        }
-
-        public int getBorder() {
-            return border;
-        }
 
         public String getDefaultValue(Map<String, Object> context) {
             if (this.defaultValue != null) {
@@ -3785,6 +3741,14 @@ public class ModelFormField {
             this.alternate = FlexibleStringExpander.getInstance(alternate);
         }
 
+        public String getStyle(Map<String, Object> context) {
+            if (UtilValidate.isNotEmpty(this.style)) return this.style.expandString(context);
+            return "";
+        }
+
+        public void setStyle(String style) {
+            this.style = FlexibleStringExpander.getInstance(style);
+        }
     }
 
     public static class ContainerField extends FieldInfo {

Modified: ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java (original)
+++ ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java Mon Mar 26 20:56:02 2012
@@ -2327,7 +2327,7 @@ public class HtmlFormRenderer extends Ht
         if (questionIndex == -1) {
             result += sessionId;
         } else {
-            result.replace("?", sessionId + "?");
+            result = result.replace("?", sessionId + "?");
         }
         return result;
     }
@@ -2733,29 +2733,17 @@ public class HtmlFormRenderer extends Ht
 
         writer.append("<img ");
 
-
         String value = modelFormField.getEntry(context, imageField.getValue(context));
         if (UtilValidate.isNotEmpty(value)) {
             writer.append(" src=\"");
             appendContentUrl(writer, value);
             writer.append('"');
         }
-
-        writer.append(" border=\"");
-        writer.append(Integer.toString(imageField.getBorder()));
-        writer.append('"');
-
-        Integer width = imageField.getWidth();
-        if (width != null) {
-            writer.append(" width=\"");
-            writer.append(width.toString());
-            writer.append('"');
-        }
-
-        Integer height = imageField.getHeight();
-        if (height != null) {
-            writer.append(" height=\"");
-            writer.append(height.toString());
+        
+        value = modelFormField.getEntry(context, imageField.getStyle(context));
+        if (UtilValidate.isNotEmpty(value)) {
+            writer.append(" class=\"");
+            appendContentUrl(writer, value);
             writer.append('"');
         }
 

Modified: ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java (original)
+++ ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java Mon Mar 26 20:56:02 2012
@@ -265,12 +265,12 @@ public class HtmlMenuRenderer extends Ht
             appendWhitespace(writer);
         }
         if (modelMenu.renderedMenuItemCount(context) > 0) {
-        	writer.append("<ul>");
-        	appendWhitespace(writer);
-        	writer.append("<li>");
-        	appendWhitespace(writer);
-        	writer.append(" <ul>");
-        	appendWhitespace(writer);
+            writer.append("<ul>");
+            appendWhitespace(writer);
+            writer.append("<li>");
+            appendWhitespace(writer);
+            writer.append(" <ul>");
+            appendWhitespace(writer);
         }
     }
 
@@ -278,19 +278,19 @@ public class HtmlMenuRenderer extends Ht
      * @see org.ofbiz.widget.menu.MenuStringRenderer#renderMenuClose(java.io.Writer, java.util.Map, org.ofbiz.widget.menu.ModelMenu)
      */
     public void renderMenuClose(Appendable writer, Map<String, Object> context, ModelMenu modelMenu) throws IOException {
-    	// TODO: div can't be directly inside an UL
+        // TODO: div can't be directly inside an UL
         String fillStyle = modelMenu.getFillStyle();
         if (UtilValidate.isNotEmpty(fillStyle)) {
             writer.append("<div class=\"").append(fillStyle).append("\">&nbsp;</div>");
         }
         //String menuContainerStyle = modelMenu.getMenuContainerStyle(context);
         if (modelMenu.renderedMenuItemCount(context) > 0) {      
-	        writer.append(" </ul>");
-	        appendWhitespace(writer);
-	        writer.append("</li>");
-	        appendWhitespace(writer);
-	        writer.append("</ul>");
-	        appendWhitespace(writer);
+            writer.append(" </ul>");
+            appendWhitespace(writer);
+            writer.append("</li>");
+            appendWhitespace(writer);
+            writer.append("</ul>");
+            appendWhitespace(writer);
         }
         writer.append(" <br class=\"clear\"/>");
         appendWhitespace(writer);
@@ -599,7 +599,3 @@ public class HtmlMenuRenderer extends Ht
         writer.append("/>");
     }
 }
-
-
-
-

Modified: ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/menu/ModelMenu.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/menu/ModelMenu.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/menu/ModelMenu.java (original)
+++ ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/menu/ModelMenu.java Mon Mar 26 20:56:02 2012
@@ -324,10 +324,10 @@ public class ModelMenu extends ModelWidg
 
     public int renderedMenuItemCount(Map<String, Object> context)
     {
-        int count = 0;    	
+        int count = 0;
         for (ModelMenuItem item : this.menuItemList) {
             if (item.shouldBeRendered(context))
-            	count++;        	
+                count++;
         }
         return count;
     }

Modified: ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/menu/ModelMenuAction.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/menu/ModelMenuAction.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/menu/ModelMenuAction.java (original)
+++ ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/menu/ModelMenuAction.java Mon Mar 26 20:56:02 2012
@@ -31,13 +31,10 @@ import javax.servlet.http.HttpSession;
 import javolution.util.FastList;
 import javolution.util.FastMap;
 
-import org.codehaus.groovy.runtime.InvokerHelper;
-
-import org.ofbiz.base.util.BshUtil;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.GeneralException;
-import org.ofbiz.base.util.GroovyUtil;
 import org.ofbiz.base.util.ObjectType;
+import org.ofbiz.base.util.ScriptUtil;
 import org.ofbiz.base.util.UtilFormatOut;
 import org.ofbiz.base.util.UtilGenerics;
 import org.ofbiz.base.util.UtilProperties;
@@ -49,6 +46,7 @@ import org.ofbiz.base.util.string.Flexib
 import org.ofbiz.entity.finder.ByAndFinder;
 import org.ofbiz.entity.finder.ByConditionFinder;
 import org.ofbiz.entity.finder.PrimaryKeyFinder;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.service.GenericServiceException;
 import org.ofbiz.service.ModelService;
 import org.ofbiz.widget.WidgetWorker;
@@ -326,9 +324,9 @@ public abstract class ModelMenuAction {
 
             String value = null;
             if (noLocale) {
-                value = UtilProperties.getPropertyValue(resource, property);
+                value = EntityUtilProperties.getPropertyValue(resource, property, WidgetWorker.getDelegator(context));
             } else {
-                value = UtilProperties.getMessage(resource, property, locale);
+                value = EntityUtilProperties.getMessage(resource, property, locale, WidgetWorker.getDelegator(context));
             }
             if (UtilValidate.isEmpty(value)) {
                 value = this.defaultExdr.expandString(context);
@@ -351,7 +349,6 @@ public abstract class ModelMenuAction {
     }
 
     public static class Script extends ModelMenuAction {
-        protected static final Object[] EMPTY_ARGS = {};
         protected String location;
         protected String method;
 
@@ -364,30 +361,7 @@ public abstract class ModelMenuAction {
 
         @Override
         public void runAction(Map<String, Object> context) {
-            if (location.endsWith(".bsh")) {
-                try {
-                    BshUtil.runBshAtLocation(location, context);
-                } catch (GeneralException e) {
-                    String errMsg = "Error running BSH script at location [" + location + "]: " + e.toString();
-                    Debug.logError(e, errMsg, module);
-                    throw new IllegalArgumentException(errMsg);
-                }
-            } else if (location.endsWith(".groovy")) {
-                try {
-                    groovy.lang.Script script = InvokerHelper.createScript(GroovyUtil.getScriptClassFromLocation(location), GroovyUtil.getBinding(context));
-                    if (UtilValidate.isEmpty(method)) {
-                        script.run();
-                    } else {
-                        script.invokeMethod(method, EMPTY_ARGS);
-                    }
-                } catch (GeneralException e) {
-                    String errMsg = "Error running Groovy script at location [" + location + "]: " + e.toString();
-                    Debug.logError(e, errMsg, module);
-                    throw new IllegalArgumentException(errMsg);
-                }
-            } else {
-                throw new IllegalArgumentException("For screen script actions the script type is not yet support for location:" + location);
-            }
+            ScriptUtil.executeScript(this.location, this.method, context);
         }
     }
 

Modified: ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java (original)
+++ ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java Mon Mar 26 20:56:02 2012
@@ -21,6 +21,7 @@ package org.ofbiz.widget.screen;
 import java.io.IOException;
 import java.net.MalformedURLException;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 
@@ -41,6 +42,7 @@ import org.ofbiz.widget.html.HtmlWidgetR
 import org.w3c.dom.Element;
 
 import freemarker.ext.beans.BeansWrapper;
+import freemarker.ext.beans.CollectionModel;
 import freemarker.ext.beans.StringModel;
 import freemarker.template.Configuration;
 import freemarker.template.Template;
@@ -61,6 +63,7 @@ public class HtmlWidget extends ModelScr
 
     // not sure if this is the best way to get FTL to use my fancy MapModel derivative, but should work at least...
     public static class ExtendedWrapper extends BeansWrapper {
+        @SuppressWarnings("unchecked")
         @Override
         public TemplateModel wrap(Object object) throws TemplateModelException {
             /* NOTE: don't use this and the StringHtmlWrapperForFtl or things will be double-encoded
@@ -71,6 +74,9 @@ public class HtmlWidget extends ModelScr
             // and handles most things without causing too many problems
             if (object instanceof String) {
                 return new StringHtmlWrapperForFtl((String) object, this);
+            } else if (object instanceof Collection && !(object instanceof Map)) {
+                // An additional wrapper to ensure ${aCollection} is properly encoded for html
+                return new CollectionHtmlWrapperForFtl((Collection) object, this);
             }
             return super.wrap(object);
         }
@@ -86,6 +92,20 @@ public class HtmlWidget extends ModelScr
         }
     }
 
+    public static class CollectionHtmlWrapperForFtl extends CollectionModel {
+
+        @SuppressWarnings("unchecked")
+        public CollectionHtmlWrapperForFtl(Collection collection, BeansWrapper wrapper) {
+            super(collection, wrapper);
+        }
+
+        @Override
+        public String getAsString() {
+            return StringUtil.htmlEncoder.encode(super.getAsString());
+        }
+
+    }
+
     // End Static, begin class section
 
     protected List<ModelScreenWidget> subWidgets = new ArrayList<ModelScreenWidget>();

Modified: ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java (original)
+++ ofbiz/branches/20111205EmailHandling/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java Mon Mar 26 20:56:02 2012
@@ -33,13 +33,10 @@ import javax.servlet.http.HttpSession;
 import javolution.util.FastList;
 import javolution.util.FastMap;
 
-import org.codehaus.groovy.runtime.InvokerHelper;
-
-import org.ofbiz.base.util.BshUtil;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.GeneralException;
-import org.ofbiz.base.util.GroovyUtil;
 import org.ofbiz.base.util.ObjectType;
+import org.ofbiz.base.util.ScriptUtil;
 import org.ofbiz.base.util.StringUtil;
 import org.ofbiz.base.util.UtilGenerics;
 import org.ofbiz.base.util.UtilProperties;
@@ -54,6 +51,7 @@ import org.ofbiz.entity.finder.ByAndFind
 import org.ofbiz.entity.finder.ByConditionFinder;
 import org.ofbiz.entity.finder.EntityFinderUtil;
 import org.ofbiz.entity.finder.PrimaryKeyFinder;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.minilang.MiniLangException;
 import org.ofbiz.minilang.SimpleMethod;
 import org.ofbiz.minilang.method.MethodContext;
@@ -377,9 +375,9 @@ public abstract class ModelScreenAction 
 
             String value = null;
             if (noLocale) {
-                value = UtilProperties.getPropertyValue(resource, property);
+                value = EntityUtilProperties.getPropertyValue(resource, property, WidgetWorker.getDelegator(context));
             } else {
-                value = UtilProperties.getMessage(resource, property, locale);
+                value = EntityUtilProperties.getMessage(resource, property, locale, WidgetWorker.getDelegator(context));
             }
             if (UtilValidate.isEmpty(value)) {
                 value = this.defaultExdr.expandString(context);
@@ -403,7 +401,6 @@ public abstract class ModelScreenAction 
 
     @Deprecated
     public static class Script extends ModelScreenAction {
-        protected static final Object[] EMPTY_ARGS = {};
         protected String location;
         protected String method;
 
@@ -416,24 +413,7 @@ public abstract class ModelScreenAction 
 
         @Override
         public void runAction(Map<String, Object> context) throws GeneralException {
-            if (location.endsWith(".bsh")) {
-                try {
-                    BshUtil.runBshAtLocation(location, context);
-                } catch (GeneralException e) {
-                    throw new GeneralException("Error running BSH script at location [" + location + "]", e);
-                }
-            } else if (location.endsWith(".groovy")) {
-                try {
-                    groovy.lang.Script script = InvokerHelper.createScript(GroovyUtil.getScriptClassFromLocation(location), GroovyUtil.getBinding(context));
-                    if (UtilValidate.isEmpty(method)) {
-                        script.run();
-                    } else {
-                        script.invokeMethod(method, EMPTY_ARGS);
-                    }
-                } catch (GeneralException e) {
-                    throw new GeneralException("Error running Groovy script at location [" + location + "]", e);
-                }
-            } else if (location.endsWith(".xml")) {
+            if (location.endsWith(".xml")) {
                 Map<String, Object> localContext = FastMap.newInstance();
                 localContext.putAll(context);
                 DispatchContext ctx = this.modelScreen.getDispatcher(context).getDispatchContext();
@@ -445,7 +425,7 @@ public abstract class ModelScreenAction 
                     throw new GeneralException("Error running simple method at location [" + location + "]", e);
                 }
             } else {
-                throw new GeneralException("For screen script actions the script type is not yet supported for location: [" + location + "]");
+                ScriptUtil.executeScript(this.location, this.method, context);
             }
         }
     }

Modified: ofbiz/branches/20111205EmailHandling/framework/widget/templates/csvFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/widget/templates/csvFormMacroLibrary.ftl?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/widget/templates/csvFormMacroLibrary.ftl (original)
+++ ofbiz/branches/20111205EmailHandling/framework/widget/templates/csvFormMacroLibrary.ftl Mon Mar 26 20:56:02 2012
@@ -54,7 +54,7 @@ under the License.
 <#macro renderSingleFormFieldTitle></#macro>
 
 <#macro renderFormOpen linkUrl formType targetWindow containerId containerStyle autocomplete name useRowSubmit></#macro>
-<#macro renderFormClose focusFieldName formName></#macro>
+<#macro renderFormClose focusFieldName formName containerId hasRequiredField></#macro>
 <#macro renderMultiFormClose></#macro>
 
 <#macro renderFormatListWrapperOpen formName style columnStyles></#macro>

Modified: ofbiz/branches/20111205EmailHandling/framework/widget/templates/foFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/widget/templates/foFormMacroLibrary.ftl?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/widget/templates/foFormMacroLibrary.ftl (original)
+++ ofbiz/branches/20111205EmailHandling/framework/widget/templates/foFormMacroLibrary.ftl Mon Mar 26 20:56:02 2012
@@ -76,8 +76,8 @@ under the License.
 <#macro renderFieldTitle style title id fieldHelpText="">${title?default("")?replace("&nbsp;", " ")}</#macro>
 <#macro renderSingleFormFieldTitle title>${title?default("")}</#macro>
     
-<#macro renderFormOpen linkUrl formType targetWindow containerId containerStyle autocomplete name useRowSubmit></#macro>
-<#macro renderFormClose focusFieldName formName></#macro>
+<#macro renderFormOpen linkUrl formType targetWindow containerId containerStyle autocomplete name viewIndexField viewSizeField viewIndex viewSize useRowSubmit></#macro>
+<#macro renderFormClose focusFieldName formName containerId hasRequiredField></#macro>
 <#macro renderMultiFormClose></#macro>
     
 <#macro renderFormatListWrapperOpen formName style columnStyles><fo:table border="solid black"><#list columnStyles as columnStyle><fo:table-column<#if columnStyle?has_content> <@getFoStyle columnStyle/></#if>/></#list></#macro>

Modified: ofbiz/branches/20111205EmailHandling/framework/widget/templates/htmlFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/widget/templates/htmlFormMacroLibrary.ftl (original)
+++ ofbiz/branches/20111205EmailHandling/framework/widget/templates/htmlFormMacroLibrary.ftl Mon Mar 26 20:56:02 2012
@@ -674,7 +674,7 @@ Parameter: lastViewName, String, optiona
 </#if>
 <#if readonly?has_content && readonly><a id="${id}_clear" style="background:none;margin-left:5px;margin-right:15px;" class="clearField" href="javascript:void();" onclick="javascript:document.${formName}.${name}.value='';<#if descriptionFieldName?has_content>document.${formName}.${descriptionFieldName}.value='';</#if>">${clearText}</a></#if>
 </span>
-<#if ajaxEnabled?has_content && ajaxEnabled>
+<#if ajaxEnabled?has_content && ajaxEnabled && (presentation?has_content && presentation == "window")>
       <#if ajaxUrl?index_of("_LAST_VIEW_NAME_") < 0>
         <#local ajaxUrl = ajaxUrl + "&amp;_LAST_VIEW_NAME_=" + lastViewName />
       </#if>
@@ -709,7 +709,7 @@ Parameter: lastViewName, String, optiona
 
 <#macro renderFileField className alert name value size maxlength autocomplete><input type="file" <@renderClass className alert /><#if name?has_content> name="${name}"</#if><#if value?has_content> value="${value}"</#if><#if size?has_content> size="${size}"</#if><#if maxlength?has_content> maxlength="${maxlength}"</#if><#if autocomplete?has_content> autocomplete="off"</#if>/><#rt/></#macro>
 <#macro renderPasswordField className alert name value size maxlength id autocomplete><input type="password" <@renderClass className alert /><#if name?has_content> name="${name}"</#if><#if value?has_content> value="${value}"</#if><#if size?has_content> size="${size}"</#if><#if maxlength?has_content> maxlength="${maxlength}"</#if><#if id?has_content> id="${id}"</#if><#if autocomplete?has_content> autocomplete="off"</#if>/></#macro>
-<#macro renderImageField value description alternate border width height event action><img<#if value?has_content> src="${value}"</#if><#if description?has_content> title="${description}"</#if> alt="<#if alternate?has_content>${alternate}"</#if>"<#if border?has_content> border="${border}"</#if><#if width?has_content> width="${width}"</#if><#if height?has_content> height="${height}"</#if><#if event?has_content> ${event?html}="${action}" </#if>/></#macro>
+<#macro renderImageField value description alternate style event action><img<#if value?has_content> src="${value}"</#if><#if description?has_content> title="${description}"</#if> alt="<#if alternate?has_content>${alternate}"</#if><#if style?has_content> class="${style}"</#if><#if event?has_content> ${event?html}="${action}" </#if>/></#macro>
 
 <#macro renderBanner style leftStyle rightStyle leftText text rightText>
 <table width="100%">  <tr><#rt/>

Modified: ofbiz/branches/20111205EmailHandling/framework/widget/templates/textFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/widget/templates/textFormMacroLibrary.ftl?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/widget/templates/textFormMacroLibrary.ftl (original)
+++ ofbiz/branches/20111205EmailHandling/framework/widget/templates/textFormMacroLibrary.ftl Mon Mar 26 20:56:02 2012
@@ -54,7 +54,7 @@ under the License.
 <#macro renderSingleFormFieldTitle></#macro>
 
 <#macro renderFormOpen linkUrl formType targetWindow containerId containerStyle autocomplete name useRowSubmit></#macro>
-<#macro renderFormClose focusFieldName formName></#macro>
+<#macro renderFormClose focusFieldName formName containerId hasRequiredField></#macro>
 <#macro renderMultiFormClose></#macro>
 
 <#macro renderFormatListWrapperOpen formName style columnStyles></#macro>

Modified: ofbiz/branches/20111205EmailHandling/framework/widget/templates/xmlFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/framework/widget/templates/xmlFormMacroLibrary.ftl?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/framework/widget/templates/xmlFormMacroLibrary.ftl (original)
+++ ofbiz/branches/20111205EmailHandling/framework/widget/templates/xmlFormMacroLibrary.ftl Mon Mar 26 20:56:02 2012
@@ -35,16 +35,16 @@ under the License.
 
 <#macro renderFormatSingleWrapperClose formName></${formName}Export></#macro>
 
-<#macro renderDisplayField type imageLocation idName description class alert inPlaceEditorId="" inPlaceEditorUrl="" inPlaceEditorParams="">
+<#macro renderDisplayField type imageLocation idName description title class alert inPlaceEditorUrl="" inPlaceEditorParams="">
 <@renderField description/>
 </#macro>
 <#macro renderHyperlinkField></#macro>
 
-<#macro renderTextField name className alert value textSize maxlength id event action disabled clientAutocomplete ajaxUrl ajaxEnabled><@renderField value/></#macro>
+<#macro renderTextField name className alert value textSize maxlength id event action disabled clientAutocomplete ajaxUrl ajaxEnabled mask><@renderField value/></#macro>
 
-<#macro renderTextareaField name className alert cols rows id readonly value visualEditorEnable language buttons><@renderField value/></#macro>
+<#macro renderTextareaField name className alert cols rows id readonly value visualEditorEnable buttons language=""><@renderField value/></#macro>
 
-<#macro renderDateTimeField name className alert title value size maxlength id event action dateType shortDateInput timeDropdownParamName defaultDateTimeString localizedIconTitle timeDropdown timeHourName classString hour1 hour2 timeMinutesName minutes isTwelveHour ampmName amSelected pmSelected compositeType formName><@renderField value/></#macro>
+<#macro renderDateTimeField name className alert title value size maxlength id dateType shortDateInput timeDropdownParamName defaultDateTimeString localizedIconTitle timeDropdown timeHourName classString hour1 hour2 timeMinutesName minutes isTwelveHour ampmName amSelected pmSelected compositeType formName mask="" event="" action="" step="" timeValues=""><@renderField value/></#macro>
 
 <#macro renderDropDownField name className alert id multiple formName otherFieldName event action size firstInList currentValue explicitDescription allowEmpty options fieldName otherFieldName otherValue otherFieldSize dDFCurrent ajaxEnabled noCurrentSelectedKey ajaxOptions frequency minChars choices autoSelect partialSearch partialChars ignoreCase fullSearch>
 </#macro>
@@ -61,8 +61,8 @@ under the License.
 <#macro renderFieldTitle style title id fieldHelpText=""></#macro>
 <#macro renderSingleFormFieldTitle title></#macro>
     
-<#macro renderFormOpen linkUrl formType targetWindow containerId containerStyle autocomplete name useRowSubmit></#macro>
-<#macro renderFormClose focusFieldName formName></#macro>
+<#macro renderFormOpen linkUrl formType targetWindow containerId containerStyle autocomplete name viewIndexField viewSizeField viewIndex viewSize useRowSubmit></#macro>
+<#macro renderFormClose focusFieldName formName containerId hasRequiredField></#macro>
 <#macro renderMultiFormClose></#macro>
 
 
@@ -96,7 +96,7 @@ under the License.
 <#macro renderRangeFindField className alert name value size maxlength autocomplete titleStyle defaultOptionFrom opEquals opGreaterThan opGreaterThanEquals opLessThan opLessThanEquals value2 defaultOptionThru>
 </#macro>
 
-<#macro renderLookupField className alert name value size maxlength id event action readonly autocomplete descriptionFieldName formName fieldFormName targetParameterIter imgSrc ajaxUrl ajaxEnabled presentation width height position fadeBackground clearText showDescription initiallyCollapsed></#macro>
+<#macro renderLookupField name formName fieldFormName className="" alert="false" value="" size="" maxlength="" id="" event="" action="" readonly=false autocomplete="" descriptionFieldName="" targetParameterIter="" imgSrc="" ajaxUrl="" ajaxEnabled=javaScriptEnabled presentation="layer" width="" height="" position="" fadeBackground="true" clearText="" showDescription="" initiallyCollapsed="" lastViewName="main" ></#macro>
 <#macro renderNextPrev paginateStyle paginateFirstStyle viewIndex highIndex listSize viewSize ajaxEnabled javaScriptEnabled ajaxFirstUrl firstUrl paginateFirstLabel paginatePreviousStyle ajaxPreviousUrl previousUrl paginatePreviousLabel pageLabel ajaxSelectUrl selectUrl ajaxSelectSizeUrl selectSizeUrl commonDisplaying paginateNextStyle ajaxNextUrl nextUrl paginateNextLabel paginateLastStyle ajaxLastUrl lastUrl paginateLastLabel paginateViewSizeLabel></#macro>
 <#macro renderFileField className alert name value size maxlength autocomplete></#macro>
 <#macro renderPasswordField className alert name value size maxlength id autocomplete></#macro>
@@ -108,7 +108,7 @@ under the License.
 <#macro renderHyperlinkTitle name title showSelectAll="N"></#macro>
 <#macro renderSortField style title linkUrl ajaxEnabled></#macro>
 <#macro formatBoundaryComment boundaryType widgetType widgetName></#macro>
-<#macro makeHiddenFormLinkAnchor linkStyle hiddenFormName event action imgSrc description><@renderField description /></#macro>
+<#macro makeHiddenFormLinkAnchor linkStyle hiddenFormName event action imgSrc description confirmation><@renderField description /></#macro>
 <#macro makeHyperlinkString linkStyle hiddenFormName event action imgSrc title alternate linkUrl targetWindow description confirmation><@renderField description /></#macro>
 <#macro renderTooltip tooltip tooltipStyle></#macro>
 <#macro renderAsterisks requiredField requiredStyle></#macro>

Modified: ofbiz/branches/20111205EmailHandling/ivy.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/ivy.xml?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/ivy.xml (original)
+++ ofbiz/branches/20111205EmailHandling/ivy.xml Mon Mar 26 20:56:02 2012
@@ -25,14 +25,15 @@
         <description homepage="http://ofbiz.apache.org/"/>
     </info>
     <configurations>
-        <conf name="cobertura" description="downloads cobertura 1.9.3 (GPL2.0) http://cobertura.sourceforge.net/"/>
+        <conf name="cobertura" description="downloads cobertura 1.9.4.1 (GPL2.0) http://cobertura.sourceforge.net/"/>
         <conf name="postgres" description="downloads the postgres JDBC driver"/>
-        <conf name="sonar-ant-task" description="downloads the ant sonar task (need sonar>=2.6)"/>
+        <conf name="sonar-ant-task" description="downloads the ant sonar task (need sonar>=2.8)
+            http://docs.codehaus.org/display/SONAR/Analyse+with+Ant+Task"/>
     </configurations>
     <dependencies>
-        <dependency org="net.sourceforge.cobertura" name="cobertura" rev="1.9.3" conf="cobertura->default"/>
+        <dependency org="net.sourceforge.cobertura" name="cobertura" rev="1.9.4.1" conf="cobertura->default"/>
         <dependency org="postgresql" name="postgresql" rev="9.0-801.jdbc4" conf="postgres->default"/>
-        <dependency org="org.codehaus.sonar-plugins" name="sonar-ant-task" rev="1.0" conf="sonar-ant-task->default"/>
+        <dependency org="org.codehaus.sonar-plugins" name="sonar-ant-task" rev="1.3" conf="sonar-ant-task->default"/>
 
         <!--Exclusions for cobertura-->
         <exclude module="oro" conf="cobertura"/>

Modified: ofbiz/branches/20111205EmailHandling/macros.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/macros.xml?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/macros.xml (original)
+++ ofbiz/branches/20111205EmailHandling/macros.xml Mon Mar 26 20:56:02 2012
@@ -194,12 +194,6 @@ under the License.
   </groovyc>
  </presetdef>
 
- <!-- replaced by ant contrib version -->    
- <!--scriptdef name="if" language="javascript" classpathref="rhino.class.path" loaderref="rhino.class.path.loader" src="${ofbiz.home.dir}/tools/If-ant.py">
-  <element name="condition" classname="org.apache.tools.ant.taskdefs.condition.And"/>
-  <element name="commands" classname="org.apache.tools.ant.taskdefs.Sequential"/>
-  <element name="else" classname="org.apache.tools.ant.taskdefs.Sequential"/>
-  </scriptdef-->
   <taskdef resource="net/sf/antcontrib/antlib.xml">
     <classpath>
         <pathelement location="${ofbiz.home.dir}/framework/base/lib/ant/ant-contrib-1.0b3.jar"/>

Propchange: ofbiz/branches/20111205EmailHandling/runtime/data/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Mar 26 20:56:02 2012
@@ -1,3 +1,5 @@
-derby
-hsql
-utilcache*
+derby
+hsql
+utilcache*
+jcr-test
+jcr

Modified: ofbiz/branches/20111205EmailHandling/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java (original)
+++ ofbiz/branches/20111205EmailHandling/specialpurpose/ebay/src/org/ofbiz/ebay/ProductsExportToEbay.java Mon Mar 26 20:56:02 2012
@@ -44,6 +44,7 @@ import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.condition.EntityCondition;
 import org.ofbiz.entity.condition.EntityOperator;
 import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.service.DispatchContext;
 import org.ofbiz.service.ModelService;
 import org.ofbiz.service.ServiceUtil;
@@ -244,19 +245,19 @@ public class ProductsExportToEbay {
                 if (listingFormat.equals("FixedPriceItem")) {
                     Element startPriceElem = UtilXml.addChildElementValue(itemElem, "StartPrice", startPrice, itemDocument);
                     if (UtilValidate.isEmpty(startPriceCurrencyUomId)) {
-                        startPriceCurrencyUomId = UtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD");
+                        startPriceCurrencyUomId = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
                     }
                     startPriceElem.setAttribute("currencyID", startPriceCurrencyUomId);
                 }else{
                     Element startPriceElem = UtilXml.addChildElementValue(itemElem, "StartPrice", startPrice, itemDocument);
                     if (UtilValidate.isEmpty(startPriceCurrencyUomId)) {
-                        startPriceCurrencyUomId = UtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD");
+                        startPriceCurrencyUomId = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
                     }
                     startPriceElem.setAttribute("currencyID", startPriceCurrencyUomId);
                     if (UtilValidate.isNotEmpty(buyItNowPrice)) {
                         Element buyNowPriceElem = UtilXml.addChildElementValue(itemElem, "BuyItNowPrice", buyItNowPrice, itemDocument);
                     if (UtilValidate.isEmpty(buyItNowCurrencyUomId)) {
-                        buyItNowCurrencyUomId = UtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD");
+                        buyItNowCurrencyUomId = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
                     }
                     buyNowPriceElem.setAttribute("currencyID", buyItNowCurrencyUomId);
                     }

Modified: ofbiz/branches/20111205EmailHandling/specialpurpose/ebay/webapp/ebay/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/specialpurpose/ebay/webapp/ebay/WEB-INF/controller.xml?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/specialpurpose/ebay/webapp/ebay/WEB-INF/controller.xml (original)
+++ ofbiz/branches/20111205EmailHandling/specialpurpose/ebay/webapp/ebay/WEB-INF/controller.xml Mon Mar 26 20:56:02 2012
@@ -142,7 +142,7 @@ under the License.
 
     <request-map uri="updatedEbayOrders">
         <security https="true" auth="true"/>
-        <event type="groovy" path="component://ebay/webapp/ebay/WEB-INF/actions/find/" invoke="updatedEbayOrders.groovy"/>
+        <event type="groovy" path="component://ebay/webapp/ebay/WEB-INF/actions/find/updatedEbayOrders.groovy"/>
         <response name="success" type="view" value="FindEbayOrders"/>
         <response name="failure" type="view" value="FindEbayOrders"/>
         <response name="error" type="view" value="FindEbayOrders"/>

Modified: ofbiz/branches/20111205EmailHandling/specialpurpose/ebay/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/specialpurpose/ebay/widget/CommonScreens.xml?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/specialpurpose/ebay/widget/CommonScreens.xml (original)
+++ ofbiz/branches/20111205EmailHandling/specialpurpose/ebay/widget/CommonScreens.xml Mon Mar 26 20:56:02 2012
@@ -66,7 +66,7 @@ under the License.
                                         <include-menu name="ProductTabBar" location="component://product/widget/catalog/CatalogMenus.xml"/>
                                         <container>
                                             <label style="h1">${uiLabelMap.${labelTitleProperty}} ${uiLabelMap.CommonFor}: ${product.internalName} [${uiLabelMap.CommonId}:${productId}]  ${${extraFunctionName}}</label>
-                                            <image src="${product.smallImageUrl}" height="40" width="40" url-mode="content"/>
+                                            <image src="${product.smallImageUrl}" url-mode="content" style="cssImgSmall"/>
                                         </container>
 
                                         <!-- add Create Product and View Product (in ecommerce) links -->

Propchange: ofbiz/branches/20111205EmailHandling/specialpurpose/ebaystore/lib/
------------------------------------------------------------------------------
  Merged /ofbiz/trunk/specialpurpose/ebaystore/lib:r1210494-1305499

Modified: ofbiz/branches/20111205EmailHandling/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayEvents.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayEvents.java (original)
+++ ofbiz/branches/20111205EmailHandling/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayEvents.java Mon Mar 26 20:56:02 2012
@@ -192,7 +192,7 @@ public class EbayEvents {
                         }
                     }
                 }
-                Debug.log("run in with productIds "+productIds);
+                Debug.logInfo("run in with productIds "+productIds, module);
                 for (String productId : productIds) {
                     AddItemCall addItemCall = new AddItemCall(apiContext);
                     ItemType item = new ItemType();
@@ -1127,7 +1127,7 @@ public class EbayEvents {
                                 revReq.setSellingManagerProductDetails(prodDetailType);
                                 revResp = (ReviseSellingManagerProductResponseType) revProdCall.execute(revReq);
                                 if (revResp != null && "SUCCESS".equals(revResp.getAck().toString())) {
-                                    Debug.log("  Already update quantity on eBay inventory with product id ::"+revResp.getSellingManagerProductDetails().getProductID());
+                                    Debug.logInfo("  Already update quantity on eBay inventory with product id ::"+revResp.getSellingManagerProductDetails().getProductID(), module);
                                 } else {
                                     EbayStoreHelper.createErrorLogMessage(userLogin, dispatcher, productStoreId, revResp.getAck().toString(), "ReviseSellingManagerProductCall : updateQuantityInventoryProduct", revResp.getErrors(0).getLongMessage());
                                 }

Modified: ofbiz/branches/20111205EmailHandling/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStore.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20111205EmailHandling/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStore.java?rev=1305581&r1=1305580&r2=1305581&view=diff
==============================================================================
--- ofbiz/branches/20111205EmailHandling/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStore.java (original)
+++ ofbiz/branches/20111205EmailHandling/specialpurpose/ebaystore/src/org/ofbiz/ebaystore/EbayStore.java Mon Mar 26 20:56:02 2012
@@ -640,7 +640,7 @@ public class EbayStore {
             } catch (GenericEntityException e1) {
                 e1.printStackTrace();
             }
-            Debug.log("userLoginId is "+userLoginId+" and productStoreId is "+ context.get("productStoreId"));
+            Debug.logInfo("userLoginId is "+userLoginId+" and productStoreId is "+ context.get("productStoreId"), module);
             GetStoreCall call = new GetStoreCall(EbayStoreHelper.getApiContext((String)context.get("productStoreId"), locale, delegator));
             //call.setSite(EbayHelper.getSiteCodeType((String)context.get("productStoreId"), locale, delegator));
             call.setCategoryStructureOnly(false);
@@ -869,7 +869,7 @@ public class EbayStore {
                 dispatcher.runSync("updateProductStore", inMap);
             }
         } catch (Exception e) {
-            Debug.log("error message"+e);
+            Debug.logError("error message"+e, module);
         }
     }