Author: jleroux
Date: Sun Feb  7 18:23:49 2016
New Revision: 1729002

URL: http://svn.apache.org/viewvc?rev=1729002&view=rev
Log:
A modified patch from Pierre Smits for "Replace 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue in .ftl files 
with EntityUtilProperties variant" 
https://issues.apache.org/jira/browse/OFBIZ-6884

Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue is used in 
several .ftl files. 

Replaces with EnittyUtilProperties variant where appropriate. 

jleroux: In this is the 2nd commit from the 3rd patch (the 2nd had issues) I 
fixed 2 "typos" I spotted while reviewing in
  ecommerce/customer/editcontactmech.ftl
  ecommerce/customer/newcustomer.ftl
where "UtilProperties" was not replaced


Modified:
    ofbiz/trunk/applications/party/webapp/partymgr/party/editcontactmech.ftl
    
ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/ImageShare.ftl
    
ofbiz/trunk/applications/product/webapp/facility/facility/EditContactMech.ftl
    ofbiz/trunk/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl
    ofbiz/trunk/framework/common/webcommon/includes/messages.ftl
    ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl
    
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl
    
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/editcontactmech.ftl
    
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/newcustomer.ftl
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/login.ftl

Modified: 
ofbiz/trunk/applications/party/webapp/partymgr/party/editcontactmech.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/editcontactmech.ftl?rev=1729002&r1=1729001&r2=1729002&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/editcontactmech.ftl 
(original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/editcontactmech.ftl 
Sun Feb  7 18:23:49 2016
@@ -165,11 +165,11 @@ under the License.
       
       <td>     
         <select name="countryGeoId" id="editcontactmechform_countryGeoId">
-          
${screens.render("component://common/widget/CommonScreens.xml#countries")}      
  
+          
${screens.render("component://common/widget/CommonScreens.xml#countries")}
           <#if (mechMap.postalAddress??) && 
(mechMap.postalAddress.countryGeoId??)>
             <#assign defaultCountryGeoId = mechMap.postalAddress.countryGeoId>
           <#else>
-           <#assign defaultCountryGeoId = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("general.properties",
 "country.geo.id.default")>
+           <#assign defaultCountryGeoId = 
Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("general",
 "country.geo.id.default", delegator)>
           </#if>
           <option selected="selected" value="${defaultCountryGeoId}">
             <#assign countryGeo = 
delegator.findOne("Geo",Static["org.ofbiz.base.util.UtilMisc"].toMap("geoId",defaultCountryGeoId),
 false)>

Modified: 
ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/ImageShare.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/ImageShare.ftl?rev=1729002&r1=1729001&r2=1729002&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/ImageShare.ftl 
(original)
+++ 
ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/ImageShare.ftl 
Sun Feb  7 18:23:49 2016
@@ -16,7 +16,7 @@ KIND, either express or implied.  See th
 specific language governing permissions and limitations
 under the License.
 -->
-<#assign contentURL = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("url.properties", 
"content.url.prefix.standard")>
+<#assign contentURL = 
Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("url", 
"content.url.prefix.standard", delegator)>
 <script type="text/javascript">
 $(document).ready(function(){
     var form = document.ImageShare;

Modified: 
ofbiz/trunk/applications/product/webapp/facility/facility/EditContactMech.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/facility/EditContactMech.ftl?rev=1729002&r1=1729001&r2=1729002&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/product/webapp/facility/facility/EditContactMech.ftl 
(original)
+++ 
ofbiz/trunk/applications/product/webapp/facility/facility/EditContactMech.ftl 
Sun Feb  7 18:23:49 2016
@@ -194,7 +194,7 @@ under the License.
           <#if (mechMap.postalAddress??) && 
(mechMap.postalAddress.countryGeoId??)>
             <#assign defaultCountryGeoId = mechMap.postalAddress.countryGeoId>
           <#else>
-           <#assign defaultCountryGeoId = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("general.properties",
 "country.geo.id.default")>
+           <#assign defaultCountryGeoId = 
Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("general",
 "country.geo.id.default", delegator)>
           </#if>
           <option selected="selected" value="${defaultCountryGeoId}">
             <#assign countryGeo = 
delegator.findOne("Geo",Static["org.ofbiz.base.util.UtilMisc"].toMap("geoId",defaultCountryGeoId),
 false)>

Modified: 
ofbiz/trunk/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl?rev=1729002&r1=1729001&r2=1729002&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl 
(original)
+++ ofbiz/trunk/framework/common/webcommon/includes/ajaxAutocompleteOptions.ftl 
Sun Feb  7 18:23:49 2016
@@ -36,7 +36,7 @@ under the License.
 var autocomp = [
     <#if autocompleteOptions?has_content>
         <#if !displayReturnField??>
-            <#assign displayReturnField = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties",
 "widget.autocompleter.displayReturnField")>
+            <#assign displayReturnField = 
Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", 
"widget.autocompleter.displayReturnField", delegator)>
         </#if>
         <#list autocompleteOptions as autocompleteOption>
             {

Modified: ofbiz/trunk/framework/common/webcommon/includes/messages.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/includes/messages.ftl?rev=1729002&r1=1729001&r2=1729002&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/includes/messages.ftl (original)
+++ ofbiz/trunk/framework/common/webcommon/includes/messages.ftl Sun Feb  7 
18:23:49 2016
@@ -49,10 +49,10 @@ under the License.
       </#if>
     </div>
   </#if>
-  <#assign jGrowlPosition = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties",
 "widget.jgrowl.position")>
-  <#assign jGrowlWidth = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties",
 "widget.jgrowl.width")>
-  <#assign jGrowlHeight = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties",
 "widget.jgrowl.height")>
-  <#assign jGrowlSpeed = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties",
 "widget.jgrowl.speed")>
+  <#assign jGrowlPosition = 
Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", 
"widget.jgrowl.position", delegator)>
+  <#assign jGrowlWidth = 
Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", 
"widget.jgrowl.width", delegator)>
+  <#assign jGrowlHeight = 
Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", 
"widget.jgrowl.height", delegator)>
+  <#assign jGrowlSpeed = 
Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", 
"widget.jgrowl.speed", delegator)>
   
   
<script>showjGrowl("${uiLabelMap.CommonShowAll}","${uiLabelMap.CommonCollapse}",
 "${uiLabelMap.CommonHideAllNotifications}", "${jGrowlPosition}", 
"${jGrowlWidth}", "${jGrowlHeight}", "${jGrowlSpeed}");</script>
   <#-- display the event messages -->
@@ -68,10 +68,10 @@ under the License.
         </#list>
       </#if>
     </div>
-    <#assign jGrowlPosition = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties",
 "widget.jgrowl.position")>
-    <#assign jGrowlWidth = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties",
 "widget.jgrowl.width")>
-    <#assign jGrowlHeight = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties",
 "widget.jgrowl.height")>
-    <#assign jGrowlSpeed = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties",
 "widget.jgrowl.speed")>
+    <#assign jGrowlPosition = 
Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", 
"widget.jgrowl.position", delegator)>
+    <#assign jGrowlWidth = 
Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", 
"widget.jgrowl.width", delegator)>
+    <#assign jGrowlHeight = 
Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", 
"widget.jgrowl.height", delegator)>
+    <#assign jGrowlSpeed = 
Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", 
"widget.jgrowl.speed", delegator)>
     
<script>showjGrowl("${uiLabelMap.CommonShowAll}","${uiLabelMap.CommonCollapse}",
 "${uiLabelMap.CommonHideAllNotifications}", "${jGrowlPosition}", 
"${jGrowlWidth}", "${jGrowlHeight}", "${jGrowlSpeed}");</script>
   </#if>
 </#escape>

Modified: ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=1729002&r1=1729001&r2=1729002&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl (original)
+++ ofbiz/trunk/framework/widget/templates/htmlFormMacroLibrary.ftl Sun Feb  7 
18:23:49 2016
@@ -69,8 +69,8 @@ under the License.
     require
   /><#t/>
   <#if ajaxEnabled?has_content && ajaxEnabled>
-    <#assign defaultMinLength = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties",
 "widget.autocompleter.defaultMinLength")>
-    <#assign defaultDelay = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties",
 "widget.autocompleter.defaultDelay")>
+    <#assign defaultMinLength = 
Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", 
"widget.autocompleter.defaultMinLength", delegator)>
+    <#assign defaultDelay = 
Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", 
"widget.autocompleter.defaultDelay", delegator)>
     <script language="JavaScript" 
type="text/javascript">ajaxAutoCompleter('${ajaxUrl}', false, 
${defaultMinLength!2}, ${defaultDelay!300});</script><#lt/>
   </#if>
 </#macro>
@@ -640,7 +640,7 @@ Parameter: tabindex, String, optional -
     <#local ajaxUrl = id + "," + ajaxUrl + ",ajaxLookup=Y" />
   </#if>
   <#if (!showDescription?has_content)>
-    <#local showDescriptionProp = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties",
 "widget.lookup.showDescription", "N")>
+    <#local showDescriptionProp = 
Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", 
"widget.lookup.showDescription", "N", delegator)>
     <#if "Y" == showDescriptionProp>
       <#local showDescription = "true" />
     <#else>
@@ -648,13 +648,13 @@ Parameter: tabindex, String, optional -
     </#if>
   </#if>
   <#if (!position?has_content)>
-    <#local position = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties",
 "widget.lookup.position", "topleft")>
+    <#local position = 
Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", 
"widget.lookup.position", "topleft", delegator)>
   </#if>
   <#if (!width?has_content)>
-    <#local width = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties",
 "widget.lookup.width", "620")>
+    <#local width = 
Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", 
"widget.lookup.width", "620", delegator)>
   </#if>
   <#if (!height?has_content)>
-    <#local height = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties",
 "widget.lookup.height", "500")>
+    <#local height = 
Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", 
"widget.lookup.height", "500", delegator)>
   </#if>
   <#if ajaxEnabled?has_content && ajaxEnabled>
     <script type="text/javascript">
@@ -691,8 +691,8 @@ Parameter: tabindex, String, optional -
       );"></a><#rt>
     <#else>
       <#if ajaxEnabled?has_content && ajaxEnabled>
-        <#assign defaultMinLength = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties",
 "widget.autocompleter.defaultMinLength")>
-        <#assign defaultDelay = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties",
 "widget.autocompleter.defaultDelay")>
+        <#assign defaultMinLength = 
Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", 
"widget.autocompleter.defaultMinLength", delegator)>
+        <#assign defaultDelay = 
Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("widget", 
"widget.autocompleter.defaultDelay", delegator)>
         <#local ajaxUrl = ajaxUrl + "&amp;_LAST_VIEW_NAME_=" + lastViewName />
         <#if !ajaxUrl?contains("searchValueFieldName=")>
           <#if descriptionFieldName?has_content && showDescription == "true">

Modified: 
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl?rev=1729002&r1=1729001&r2=1729002&view=diff
==============================================================================
--- 
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl 
(original)
+++ 
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl 
Sun Feb  7 18:23:49 2016
@@ -551,9 +551,9 @@ $(function(){
           <form method="post" action="<@ofbizUrl>additem</@ofbizUrl>" 
name="addform"  style="margin: 0;">
           <fieldset>
             <#assign inStock = true />
-            <#assign commentEnable = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("order.properties",
 "order.item.comment.enable")>
+            <#assign commentEnable = 
Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("order", 
"order.item.comment.enable", delegator)>
             <#if commentEnable.equals("Y")>
-                <#assign orderItemAttr = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("order.properties",
 "order.item.attr.prefix")>
+                <#assign orderItemAttr = 
Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("order", 
"order.item.attr.prefix", delegator)>
                 ${uiLabelMap.CommonComment}&nbsp;<input type="text" 
name="${orderItemAttr}comment"/>
             </#if>
             <#-- Variant Selection -->

Modified: 
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/editcontactmech.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/editcontactmech.ftl?rev=1729002&r1=1729001&r2=1729002&view=diff
==============================================================================
--- 
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/editcontactmech.ftl
 (original)
+++ 
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/editcontactmech.ftl
 Sun Feb  7 18:23:49 2016
@@ -182,7 +182,7 @@ under the License.
           <#if (postalAddress??) && (postalAddress.countryGeoId??)>
             <#assign defaultCountryGeoId = postalAddress.countryGeoId>
           <#else>
-            <#assign defaultCountryGeoId = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("general.properties",
 "country.geo.id.default")>
+            <#assign defaultCountryGeoId = 
Static["org.ofbiz.base.util.EntityUtilProperties"].getPropertyValue("general", 
"country.geo.id.default", delegator)>
           </#if>
           <option selected="selected" value="${defaultCountryGeoId}">
           <#assign countryGeo = 
delegator.findOne("Geo",Static["org.ofbiz.base.util.UtilMisc"].toMap("geoId",defaultCountryGeoId),
 false)>

Modified: 
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/newcustomer.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/newcustomer.ftl?rev=1729002&r1=1729001&r2=1729002&view=diff
==============================================================================
--- 
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/newcustomer.ftl 
(original)
+++ 
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/newcustomer.ftl 
Sun Feb  7 18:23:49 2016
@@ -211,8 +211,8 @@ will generally always be reserved for th
         <label for="customerCountry">${uiLabelMap.CommonCountry}*</label>
         <@fieldErrors fieldName="CUSTOMER_COUNTRY"/>
         <select name="CUSTOMER_COUNTRY" id="newuserform_countryGeoId">
-            
${screens.render("component://common/widget/CommonScreens.xml#countries")}      
  
-            <#assign defaultCountryGeoId = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("general.properties",
 "country.geo.id.default")>
+            
${screens.render("component://common/widget/CommonScreens.xml#countries")}
+            <#assign defaultCountryGeoId = 
Static["org.ofbiz.base.util.EntityUtilProperties"].getPropertyValue("general", 
"country.geo.id.default", delegator)>
             <option selected="selected" value="${defaultCountryGeoId}">
                 <#assign countryGeo = 
delegator.findOne("Geo",Static["org.ofbiz.base.util.UtilMisc"].toMap("geoId",defaultCountryGeoId),
 false)>
                 ${countryGeo.get("geoName",locale)}

Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/login.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/login.ftl?rev=1729002&r1=1729001&r2=1729002&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/login.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/login.ftl Sun Feb  7 
18:23:49 2016
@@ -16,8 +16,8 @@ KIND, either express or implied.  See th
 specific language governing permissions and limitations
 under the License.
 -->
-<#assign janrainEnabled = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("ecommerce.properties",
 "janrain.enabled")>
-<#assign appName = 
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("ecommerce.properties",
 "janrain.appName")>
+<#assign janrainEnabled = 
Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("ecommerce",
 "janrain.enabled", delegator)>
+<#assign appName = 
Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("ecommerce.properties",
 "janrain.appName", delegator)>
 <#if janrainEnabled == "Y">
 <script type="text/javascript">
 (function() {


Reply via email to