svn commit: r1785926 - in /ofbiz/branches/release16.11: ./ framework/entity/src/main/java/org/apache/ofbiz/entity/util/ framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/ framework/widget/templates/

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

svn commit: r1785926 - in /ofbiz/branches/release16.11: ./ framework/entity/src/main/java/org/apache/ofbiz/entity/util/ framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/ framework/widget/templates/

jleroux@apache.org
Author: jleroux
Date: Wed Mar  8 08:26:34 2017
New Revision: 1785926

URL: http://svn.apache.org/viewvc?rev=1785926&view=rev
Log:
"Applied fix from trunk framework for revision: 1785882"
------------------------------------------------------------------------
r1785882 | jleroux | 2017-03-07 21:33:09 +0100 (mar. 07 mars 2017) | 18 lignes

Fixed: Missing reference to the delegator in HtmlFormMacroLibrary.ftl
(OFBIZ-9230)

This has been temporarily fixed with r1784259. After a discussion on dev ML and
a code analysis reported in the Jira issue, I decided to follow Rishi Solanki's
idea of using the delegatorName.

Since we have no context when executing a macro in the widget form, I decided
to pass it to the macro. I had though to create an
EntityUtilProperties.getPropertyValueFromDelegatorName() method to eventually
pass the delegatorName. Two macros were concerned renderLookupField and
renderTextField.

Note: while analysing the code I found that EntityExpr.checkRhsType() can face
a related kind of problem. I'll commit an improvement later...

Thanks: Wai for report and discussion and Rishi for pursuing his idea of using
the delegatorName

------------------------------------------------------------------------
Completed with r1785925
No functional changes, I missed the other macro types which don't implement these macros

------------------------------------------------------------------------

Modified:
    ofbiz/branches/release16.11/   (props changed)
    ofbiz/branches/release16.11/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityUtilProperties.java
    ofbiz/branches/release16.11/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java
    ofbiz/branches/release16.11/framework/widget/templates/CsvFormMacroLibrary.ftl
    ofbiz/branches/release16.11/framework/widget/templates/FoFormMacroLibrary.ftl
    ofbiz/branches/release16.11/framework/widget/templates/HtmlFormMacroLibrary.ftl
    ofbiz/branches/release16.11/framework/widget/templates/TextFormMacroLibrary.ftl
    ofbiz/branches/release16.11/framework/widget/templates/XmlFormMacroLibrary.ftl
    ofbiz/branches/release16.11/framework/widget/templates/xlsFormMacroLibrary.ftl

Propchange: ofbiz/branches/release16.11/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Mar  8 08:26:34 2017
@@ -10,5 +10,5 @@
 /ofbiz/branches/json-integration-refactoring:1634077-1635900
 /ofbiz/branches/multitenant20100310:921280-927264
 /ofbiz/branches/release13.07:1547657
-/ofbiz/ofbiz-framework/trunk:1783202,1783388,1784549,1784558,1784708
+/ofbiz/ofbiz-framework/trunk:1783202,1783388,1784549,1784558,1784708,1785882,1785925
 /ofbiz/trunk:1770481,1770490,1770540,1771440,1771448,1771516,1771935,1772346,1772880,1774772,1775441,1779724,1780659,1781109,1781125,1781979,1782498,1782520

Modified: ofbiz/branches/release16.11/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityUtilProperties.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release16.11/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityUtilProperties.java?rev=1785926&r1=1785925&r2=1785926&view=diff
==============================================================================
--- ofbiz/branches/release16.11/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityUtilProperties.java (original)
+++ ofbiz/branches/release16.11/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityUtilProperties.java Wed Mar  8 08:26:34 2017
@@ -40,6 +40,7 @@ import org.apache.ofbiz.base.util.UtilPr
 import org.apache.ofbiz.base.util.UtilValidate;
 import org.apache.ofbiz.base.util.collections.ResourceBundleMapWrapper;
 import org.apache.ofbiz.entity.Delegator;
+import org.apache.ofbiz.entity.DelegatorFactory;
 import org.apache.ofbiz.entity.GenericEntityException;
 import org.apache.ofbiz.entity.GenericValue;
 
@@ -78,7 +79,7 @@ public final class EntityUtilProperties
                 results.put("value", "");
                 return results;
             }
-        } catch (Exception e) {
+        } catch (GenericEntityException e) {
             Debug.logInfo("Could not get a system property for " + name + " : " + e.getMessage(), module);
         }
         return results;
@@ -107,6 +108,27 @@ public final class EntityUtilProperties
             return UtilProperties.getPropertyValue(resource, name, defaultValue);
         }
     }
+    
+    public static String getPropertyValueFromDelegatorName(String resource, String name, String defaultValue, String delegatorName) {
+        Delegator delegator = DelegatorFactory.getDelegator(delegatorName);
+        if (delegator == null) { // This should not happen, but in case...
+            Debug.logError("Could not get a delegator. Using the 'default' delegator", module);
+            // this will be the common case for now as the delegator isn't available where we want to do this
+            // we'll cheat a little here and assume the default delegator
+            delegator = DelegatorFactory.getDelegator("default");
+            Debug.logError("Could not get a delegator. Using the 'default' delegator", module);
+            if (delegator == null) {
+                Debug.logError("Could not get a system property for " + name + ". Reason: the delegator is null", module);
+            }
+        }
+        Map<String, String> propMap = getSystemPropertyValue(resource, name, delegator);
+        if ("Y".equals(propMap.get("isExistInDb"))) {
+            String s = propMap.get("value");
+            return (UtilValidate.isEmpty(s)) ? defaultValue : s;
+        } else {
+            return UtilProperties.getPropertyValue(resource, name, defaultValue);
+        }
+    }
 
     public static double getPropertyNumber(String resource, String name, double defaultValue) {
         return UtilProperties.getPropertyNumber(resource, name, defaultValue);
@@ -148,6 +170,26 @@ public final class EntityUtilProperties
         Map<String, String> propMap = getSystemPropertyValue(resource, name, delegator);
         if ("Y".equals(propMap.get("isExistInDb"))) {
             return propMap.get("value");
+        } else {
+            return UtilProperties.getPropertyValue(resource, name);
+        }
+    }
+
+    public static String getPropertyValueFromDelegatorName(String resource, String name, String delegatorName) {
+        Delegator delegator = DelegatorFactory.getDelegator(delegatorName);
+        if (delegator == null) { // This should not happen, but in case...
+            Debug.logError("Could not get a delegator. Using the 'default' delegator", module);
+            // this will be the common case for now as the delegator isn't available where we want to do this
+            // we'll cheat a little here and assume the default delegator
+            delegator = DelegatorFactory.getDelegator("default");
+            Debug.logError("Could not get a delegator. Using the 'default' delegator", module);
+            if (delegator == null) {
+                Debug.logError("Could not get a system property for " + name + ". Reason: the delegator is null", module);
+            }
+        }
+        Map<String, String> propMap = getSystemPropertyValue(resource, name, delegator);
+        if ("Y".equals(propMap.get("isExistInDb"))) {
+            return propMap.get("value");
         } else {
             return UtilProperties.getPropertyValue(resource, name);
         }

Modified: ofbiz/branches/release16.11/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release16.11/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java?rev=1785926&r1=1785925&r2=1785926&view=diff
==============================================================================
--- ofbiz/branches/release16.11/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java (original)
+++ ofbiz/branches/release16.11/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java Wed Mar  8 08:26:34 2017
@@ -38,6 +38,7 @@ import java.util.WeakHashMap;
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
 
 import org.apache.ofbiz.base.util.Debug;
 import org.apache.ofbiz.base.util.StringUtil;
@@ -418,6 +419,8 @@ public final class MacroFormRenderer imp
         sr.append(placeholder);
         sr.append("\" tabindex=\"");
         sr.append(tabindex);
+        sr.append("\" delegatorName=\"");
+        sr.append(((HttpSession)context.get("session")).getAttribute("delegatorName").toString());
         sr.append("\" />");
         executeMacro(writer, sr.toString());
         ModelFormField.SubHyperlink subHyperlink = textField.getSubHyperlink();
@@ -2262,6 +2265,8 @@ public final class MacroFormRenderer imp
         sr.append(lastViewName);
         sr.append("\" tabindex=\"");
         sr.append(tabindex);
+        sr.append("\" delegatorName=\"");
+        sr.append(((HttpSession)context.get("session")).getAttribute("delegatorName").toString());
         sr.append("\" />");
         executeMacro(writer, sr.toString());
         this.addAsterisks(writer, context, modelFormField);

Modified: ofbiz/branches/release16.11/framework/widget/templates/CsvFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release16.11/framework/widget/templates/CsvFormMacroLibrary.ftl?rev=1785926&r1=1785925&r2=1785926&view=diff
==============================================================================
--- ofbiz/branches/release16.11/framework/widget/templates/CsvFormMacroLibrary.ftl (original)
+++ ofbiz/branches/release16.11/framework/widget/templates/CsvFormMacroLibrary.ftl Wed Mar  8 08:26:34 2017
@@ -24,7 +24,7 @@ under the License.
 </#macro>
 <#macro renderHyperlinkField></#macro>
 
-<#macro renderTextField name className alert value textSize maxlength id event action disabled clientAutocomplete ajaxUrl ajaxEnabled mask tabindex  readonly placeholder=""><@renderField value /></#macro>
+<#macro renderTextField name className alert value textSize maxlength id event action disabled clientAutocomplete ajaxUrl ajaxEnabled mask tabindex readonly placeholder="" delegatorName="default"><@renderField value /></#macro>
 
 <#macro renderTextareaField name className alert cols rows maxlength id readonly value visualEditorEnable buttons tabindex language=""><@renderField value /></#macro>
 
@@ -105,7 +105,7 @@ under the License.
 <@renderField value />
 </#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" tabindex=""></#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" tabindex="" delegatorName="default">></#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 tabindex><@renderField value /></#macro>
 <#macro renderPasswordField className alert name value size maxlength id autocomplete tabindex></#macro>

Modified: ofbiz/branches/release16.11/framework/widget/templates/FoFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release16.11/framework/widget/templates/FoFormMacroLibrary.ftl?rev=1785926&r1=1785925&r2=1785926&view=diff
==============================================================================
--- ofbiz/branches/release16.11/framework/widget/templates/FoFormMacroLibrary.ftl (original)
+++ ofbiz/branches/release16.11/framework/widget/templates/FoFormMacroLibrary.ftl Wed Mar  8 08:26:34 2017
@@ -51,7 +51,7 @@ under the License.
 </#macro>
 <#macro renderHyperlinkField><!--hyper--></#macro>
 
-<#macro renderTextField name className alert value textSize maxlength id event action disabled clientAutocomplete ajaxUrl ajaxEnabled mask tabindex readonly placeholder=""><@makeBlock className value /></#macro>
+<#macro renderTextField name className alert value textSize maxlength id event action disabled clientAutocomplete ajaxUrl ajaxEnabled mask tabindex readonly placeholder="" delegatorName="default"><@makeBlock className value /></#macro>
 
 <#macro renderTextareaField name className alert cols rows maxlength id readonly value visualEditorEnable language buttons tabindex language=""><@makeBlock className value /></#macro>
 
@@ -130,7 +130,7 @@ under the License.
 <@makeBlock className value />
 </#macro>
 
-<#macro renderLookupField name formName fieldFormName className="" alert="" value="" size="" maxlength="" id="" event="" action="" readonly=false autocomplete="" descriptionFieldName="" targetParameterIter="" imgSrc="" ajaxUrl="" ajaxEnabled=javaScriptEnabled presentation="" width="" height="" position="" fadeBackground="" clearText="" showDescription="" initiallyCollapsed="" lastViewName="" tabindex=""></#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" tabindex="" delegatorName="default"></#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 tabindex><@makeBlock className value /></#macro>
 <#macro renderPasswordField className alert name value size maxlength id autocomplete tabindex><@makeBlock className "" /></#macro>

Modified: ofbiz/branches/release16.11/framework/widget/templates/HtmlFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release16.11/framework/widget/templates/HtmlFormMacroLibrary.ftl?rev=1785926&r1=1785925&r2=1785926&view=diff
==============================================================================
--- ofbiz/branches/release16.11/framework/widget/templates/HtmlFormMacroLibrary.ftl (original)
+++ ofbiz/branches/release16.11/framework/widget/templates/HtmlFormMacroLibrary.ftl Wed Mar  8 08:26:34 2017
@@ -48,7 +48,7 @@ under the License.
 </#macro>
 <#macro renderHyperlinkField></#macro>
 
-<#macro renderTextField name className alert value textSize maxlength id event action disabled clientAutocomplete ajaxUrl ajaxEnabled mask tabindex  readonly placeholder="">
+<#macro renderTextField name className alert value textSize maxlength id event action disabled clientAutocomplete ajaxUrl ajaxEnabled mask tabindex readonly placeholder="" delegatorName="default">
   <#if mask?has_content>
     <script type="text/javascript">
       jQuery(function($){jQuery("#${id}").mask("${mask}");});
@@ -69,8 +69,8 @@ under the License.
     require
   /><#t/>
   <#if ajaxEnabled?has_content && ajaxEnabled>
-    <#assign defaultMinLength = Static["org.apache.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", "widget.autocompleter.defaultMinLength", delegator)>
-    <#assign defaultDelay = Static["org.apache.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", "widget.autocompleter.defaultDelay", delegator)>
+    <#assign defaultMinLength = Static["org.apache.ofbiz.entity.util.EntityUtilProperties"].getPropertyValueFromDelegatorName("widget", "widget.autocompleter.defaultMinLength", delegatorName)>
+    <#assign defaultDelay = Static["org.apache.ofbiz.entity.util.EntityUtilProperties"].getPropertyValueFromDelegatorName("widget", "widget.autocompleter.defaultDelay", delegatorName)>
     <script language="JavaScript" type="text/javascript">ajaxAutoCompleter('${ajaxUrl}', false, ${defaultMinLength!2}, ${defaultDelay!300});</script><#lt/>
   </#if>
 </#macro>
@@ -631,8 +631,9 @@ Parameter: showDescription, String, opti
 Parameter: initiallyCollapsed, Not used.
 Parameter: lastViewName, String, optional - If the ajaxEnabled parameter is true, the contents of lastViewName will be appended to the Ajax URL.
 Parameter: tabindex, String, optional - HTML tabindex number.
+Parameter: delegatorName, String, optional - name of the delegator in context.
 -->
-<#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" tabindex="">
+<#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" tabindex="" delegatorName="default">
   <#if Static["org.apache.ofbiz.widget.model.ModelWidget"].widgetBoundaryCommentsEnabled(context)>
   <!-- @renderLookupField -->
   </#if>
@@ -641,7 +642,7 @@ Parameter: tabindex, String, optional -
     <#local ajaxUrl = id + "," + ajaxUrl + ",ajaxLookup=Y" />
   </#if>
   <#if (!showDescription?has_content)>
-    <#local showDescriptionProp = Static["org.apache.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", "widget.lookup.showDescription", "N", delegator)>
+    <#local showDescriptionProp = Static["org.apache.ofbiz.entity.util.EntityUtilProperties"].getPropertyValueFromDelegatorName("widget", "widget.lookup.showDescription", "N", delegatorName)>
     <#if "Y" == showDescriptionProp>
       <#local showDescription = "true" />
     <#else>
@@ -649,13 +650,13 @@ Parameter: tabindex, String, optional -
     </#if>
   </#if>
   <#if (!position?has_content)>
-    <#local position = Static["org.apache.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", "widget.lookup.position", "topleft", delegator)>
+    <#local position = Static["org.apache.ofbiz.entity.util.EntityUtilProperties"].getPropertyValueFromDelegatorName("widget", "widget.lookup.position", "topleft", delegatorName)>
   </#if>
   <#if (!width?has_content)>
-    <#local width = Static["org.apache.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", "widget.lookup.width", "620", delegator)>
+    <#local width = Static["org.apache.ofbiz.entity.util.EntityUtilProperties"].getPropertyValueFromDelegatorName("widget", "widget.lookup.width", "620", delegatorName)>
   </#if>
   <#if (!height?has_content)>
-    <#local height = Static["org.apache.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", "widget.lookup.height", "500", delegator)>
+    <#local height = Static["org.apache.ofbiz.entity.util.EntityUtilProperties"].getPropertyValueFromDelegatorName("widget", "widget.lookup.height", "500", delegatorName)>
   </#if>
   <#if ajaxEnabled?has_content && ajaxEnabled>
     <script type="text/javascript">
@@ -692,8 +693,8 @@ Parameter: tabindex, String, optional -
       );"></a><#rt>
     <#else>
       <#if ajaxEnabled?has_content && ajaxEnabled>
-        <#assign defaultMinLength = Static["org.apache.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", "widget.autocompleter.defaultMinLength", delegator)>
-        <#assign defaultDelay = Static["org.apache.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", "widget.autocompleter.defaultDelay", delegator)>
+        <#assign defaultMinLength = Static["org.apache.ofbiz.entity.util.EntityUtilProperties"].getPropertyValueFromDelegatorName("widget", "widget.autocompleter.defaultMinLength", delegatorName)>
+        <#assign defaultDelay = Static["org.apache.ofbiz.entity.util.EntityUtilProperties"].getPropertyValueFromDelegatorName("widget", "widget.autocompleter.defaultDelay", delegatorName)>
         <#local ajaxUrl = ajaxUrl + "&amp;_LAST_VIEW_NAME_=" + lastViewName />
         <#if !ajaxUrl?contains("searchValueFieldName=")>
           <#if descriptionFieldName?has_content && showDescription == "true">

Modified: ofbiz/branches/release16.11/framework/widget/templates/TextFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release16.11/framework/widget/templates/TextFormMacroLibrary.ftl?rev=1785926&r1=1785925&r2=1785926&view=diff
==============================================================================
--- ofbiz/branches/release16.11/framework/widget/templates/TextFormMacroLibrary.ftl (original)
+++ ofbiz/branches/release16.11/framework/widget/templates/TextFormMacroLibrary.ftl Wed Mar  8 08:26:34 2017
@@ -24,7 +24,7 @@ under the License.
 </#macro>
 <#macro renderHyperlinkField></#macro>
 
-<#macro renderTextField name className alert value textSize maxlength id event action disabled clientAutocomplete ajaxUrl ajaxEnabled mask tabindex  readonly placeholder=""><@renderField value /></#macro>
+<#macro renderTextField name className alert value textSize maxlength id event action disabled clientAutocomplete ajaxUrl ajaxEnabled mask tabindex readonly placeholder="" delegatorName="default"><@renderField value /></#macro>
 
 <#macro renderTextareaField name className alert cols rows maxlength id readonly value visualEditorEnable buttons tabindex language=""><@renderField value /></#macro>
 
@@ -105,7 +105,7 @@ under the License.
 <@renderField value />
 </#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" tabindex=""><@renderField value /></#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" tabindex="" delegatorName="default">><@renderField value /></#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 tabindex><@renderField value /></#macro>
 <#macro renderPasswordField className alert name value size maxlength id autocomplete tabindex></#macro>

Modified: ofbiz/branches/release16.11/framework/widget/templates/XmlFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release16.11/framework/widget/templates/XmlFormMacroLibrary.ftl?rev=1785926&r1=1785925&r2=1785926&view=diff
==============================================================================
--- ofbiz/branches/release16.11/framework/widget/templates/XmlFormMacroLibrary.ftl (original)
+++ ofbiz/branches/release16.11/framework/widget/templates/XmlFormMacroLibrary.ftl Wed Mar  8 08:26:34 2017
@@ -40,7 +40,7 @@ under the License.
 </#macro>
 <#macro renderHyperlinkField></#macro>
 
-<#macro renderTextField name className alert value textSize maxlength id event action disabled clientAutocomplete ajaxUrl ajaxEnabled mask tabindex readonly placeholder=""><@renderField value/></#macro>
+<#macro renderTextField name className alert value textSize maxlength id event action disabled clientAutocomplete ajaxUrl ajaxEnabled mask tabindex readonly placeholder="" delegatorName="default"><@renderField value/></#macro>
 
 <#macro renderTextareaField name className alert cols rows maxlength id readonly value visualEditorEnable buttons tabindex language=""><@renderField value/></#macro>
 
@@ -97,7 +97,7 @@ under the License.
 <#macro renderRangeFindField className alert name value size maxlength autocomplete titleStyle defaultOptionFrom opEquals opGreaterThan opGreaterThanEquals opLessThan opLessThanEquals value2 defaultOptionThru tabindex>
 </#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" tabindex=""></#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" tabindex="" delegatorName="default">></#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 tabindex></#macro>
 <#macro renderPasswordField className alert name value size maxlength id autocomplete tabindex></#macro>

Modified: ofbiz/branches/release16.11/framework/widget/templates/xlsFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release16.11/framework/widget/templates/xlsFormMacroLibrary.ftl?rev=1785926&r1=1785925&r2=1785926&view=diff
==============================================================================
--- ofbiz/branches/release16.11/framework/widget/templates/xlsFormMacroLibrary.ftl (original)
+++ ofbiz/branches/release16.11/framework/widget/templates/xlsFormMacroLibrary.ftl Wed Mar  8 08:26:34 2017
@@ -30,7 +30,7 @@ under the License.
 </#macro>
 <#macro renderHyperlinkField></#macro>
 
-<#macro renderTextField name className alert value textSize maxlength id event action disabled clientAutocomplete ajaxUrl ajaxEnabled mask tabindex  readonly placeholder=""><@renderItemField value "txf" className/></#macro>
+<#macro renderTextField name className alert value textSize maxlength id event action disabled clientAutocomplete ajaxUrl ajaxEnabled mask tabindex readonly placeholder="" delegatorName="default"><@renderItemField value "txf" className/></#macro>
 
 <#macro renderTextareaField name className alert cols rows maxlength id readonly value visualEditorEnable buttons tabindex language=""></#macro>
 
@@ -118,7 +118,7 @@ under the License.
 
 <#macro renderRangeFindField className alert name value size maxlength autocomplete titleStyle defaultOptionFrom opEquals opGreaterThan opGreaterThanEquals opLessThan opLessThanEquals value2 defaultOptionThru tabindex></#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" tabindex=""><@renderItemField value "txf" className/></#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" tabindex="" delegatorName="default">><@renderItemField value "txf" className/></#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>