Author: jleroux
Date: Thu Jul 30 09:26:20 2015
New Revision: 1693400

URL: http://svn.apache.org/r1693400
Log:
Document to makes the changes for OFBIZ-6504 more clear

Modified:
    
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroFormRenderer.java
    ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl

Modified: 
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroFormRenderer.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroFormRenderer.java?rev=1693400&r1=1693399&r2=1693400&view=diff
==============================================================================
--- 
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroFormRenderer.java
 (original)
+++ 
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/macro/MacroFormRenderer.java
 Thu Jul 30 09:26:20 2015
@@ -849,7 +849,7 @@ public final class MacroFormRenderer imp
             if (textSize > 0 && description.length() > textSize) {
                 description = description.substring(0, textSize - 8) + "..." + 
description.substring(description.length() - 5);
             }
-            options.append(encode(description.replaceAll("'", "\\\\\'"), 
modelFormField, context));
+            options.append(encode(description.replaceAll("'", "\\\\\'"), 
modelFormField, context));  // replaceAll("'", "\\\\\'") related to OFBIZ-6504
 
             if (UtilValidate.isNotEmpty(currentValueList)) {
                 options.append("'");

Modified: ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=1693400&r1=1693399&r2=1693400&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl (original)
+++ ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl Thu Jul 30 
09:26:20 2015
@@ -231,7 +231,7 @@ under the License.
   <span class="ui-widget">
     <select name="${name?default("")}<#rt/>" <@renderClass className alert 
/><#if id?has_content> id="${id}"</#if><#if multiple?has_content> 
multiple="multiple"</#if><#if otherFieldSize gt 0> 
onchange="process_choice(this,document.${formName}.${otherFieldName})"</#if><#if
 event?has_content> ${event}="${action}"</#if><#if size?has_content> 
size="${size}"</#if><#if tabindex?has_content> 
tabindex="${tabindex}"</#if><#rt/>>
       <#if firstInList?has_content && currentValue?has_content && 
!multiple?has_content>
-        <option selected="selected" 
value="${currentValue}">${explicitDescription?replace("&#x5c;&#x27;","&#x27;")}</option><#rt/>
+        <option selected="selected" 
value="${currentValue}">${explicitDescription?replace("&#x5c;&#x27;","&#x27;")}</option><#rt/><#--
 replace("&#x5c;&#x27;","&#x27;") related to OFBIZ-6504 -->
         <option value="${currentValue}">---</option><#rt/>
       </#if>
       <#if allowEmpty?has_content || !options?has_content>
@@ -239,9 +239,9 @@ under the License.
       </#if>
       <#list options as item>
         <#if multiple?has_content>
-          <option<#if currentValue?has_content && item.selected?has_content> 
selected="${item.selected}" <#elseif !currentValue?has_content && 
noCurrentSelectedKey?has_content && noCurrentSelectedKey == item.key> 
selected="selected" </#if> 
value="${item.key}">${item.description?replace("&#x5c;&#x27;","&#x27;")}</option><#rt/>
+          <option<#if currentValue?has_content && item.selected?has_content> 
selected="${item.selected}" <#elseif !currentValue?has_content && 
noCurrentSelectedKey?has_content && noCurrentSelectedKey == item.key> 
selected="selected" </#if> 
value="${item.key}">${item.description?replace("&#x5c;&#x27;","&#x27;")}</option><#rt/>
 <#-- replace("&#x5c;&#x27;","&#x27;") related to OFBIZ-6504 -->
         <#else>
-          <option<#if currentValue?has_content && currentValue == item.key && 
dDFCurrent?has_content && "selected" == dDFCurrent> selected="selected"<#elseif 
!currentValue?has_content && noCurrentSelectedKey?has_content && 
noCurrentSelectedKey == item.key> selected="selected"</#if> 
value="${item.key}">${item.description?replace("&#x5c;&#x27;","&#x27;")}</option><#rt/>
+          <option<#if currentValue?has_content && currentValue == item.key && 
dDFCurrent?has_content && "selected" == dDFCurrent> selected="selected"<#elseif 
!currentValue?has_content && noCurrentSelectedKey?has_content && 
noCurrentSelectedKey == item.key> selected="selected"</#if> 
value="${item.key}">${item.description?replace("&#x5c;&#x27;","&#x27;")}</option><#rt/>
 <#-- replace("&#x5c;&#x27;","&#x27;") related to OFBIZ-6504 -->
         </#if>
       </#list>
     </select>


Reply via email to