svn commit: r687422 [2/2] - in /ofbiz/trunk: applications/accounting/src/org/ofbiz/accounting/finaccount/ applications/content/src/org/ofbiz/content/content/ framework/base/src/org/ofbiz/base/util/string/ framework/entity/src/org/ofbiz/entity/finder/ f...

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

svn commit: r687422 [2/2] - in /ofbiz/trunk: applications/accounting/src/org/ofbiz/accounting/finaccount/ applications/content/src/org/ofbiz/content/content/ framework/base/src/org/ofbiz/base/util/string/ framework/entity/src/org/ofbiz/entity/finder/ f...

adrianc
Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuAction.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuAction.java?rev=687422&r1=687421&r2=687422&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuAction.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuAction.java Wed Aug 20 11:50:04 2008
@@ -132,9 +132,9 @@
             super (modelMenu, setElement);
             this.field = new FlexibleMapAccessor<Object>(setElement.getAttribute("field"));
             this.fromField = UtilValidate.isNotEmpty(setElement.getAttribute("from-field")) ? new FlexibleMapAccessor<Object>(setElement.getAttribute("from-field")) : null;
-            this.valueExdr = UtilValidate.isNotEmpty(setElement.getAttribute("value")) ? new FlexibleStringExpander(setElement.getAttribute("value")) : null;
-            this.defaultExdr = UtilValidate.isNotEmpty(setElement.getAttribute("default-value")) ? new FlexibleStringExpander(setElement.getAttribute("default-value")) : null;
-            this.globalExdr = new FlexibleStringExpander(setElement.getAttribute("global"));
+            this.valueExdr = UtilValidate.isNotEmpty(setElement.getAttribute("value")) ? FlexibleStringExpander.getInstance(setElement.getAttribute("value")) : null;
+            this.defaultExdr = UtilValidate.isNotEmpty(setElement.getAttribute("default-value")) ? FlexibleStringExpander.getInstance(setElement.getAttribute("default-value")) : null;
+            this.globalExdr = FlexibleStringExpander.getInstance(setElement.getAttribute("global"));
             this.type = setElement.getAttribute("type");
             this.toScope = setElement.getAttribute("to-scope");
             this.fromScope = setElement.getAttribute("from-scope");
@@ -242,9 +242,9 @@
         
         public PropertyMap(ModelMenu modelMenu, Element setElement) {
             super (modelMenu, setElement);
-            this.resourceExdr = new FlexibleStringExpander(setElement.getAttribute("resource"));
+            this.resourceExdr = FlexibleStringExpander.getInstance(setElement.getAttribute("resource"));
             this.mapNameAcsr = new FlexibleMapAccessor<Map<String, Object>>(setElement.getAttribute("map-name"));
-            this.globalExdr = new FlexibleStringExpander(setElement.getAttribute("global"));
+            this.globalExdr = FlexibleStringExpander.getInstance(setElement.getAttribute("global"));
         }
         
         public void runAction(Map<String, Object> context) {
@@ -278,13 +278,13 @@
 
         public PropertyToField(ModelMenu modelMenu, Element setElement) {
             super (modelMenu, setElement);
-            this.resourceExdr = new FlexibleStringExpander(setElement.getAttribute("resource"));
-            this.propertyExdr = new FlexibleStringExpander(setElement.getAttribute("property"));
+            this.resourceExdr = FlexibleStringExpander.getInstance(setElement.getAttribute("resource"));
+            this.propertyExdr = FlexibleStringExpander.getInstance(setElement.getAttribute("property"));
             this.fieldAcsr = new FlexibleMapAccessor<Object>(setElement.getAttribute("field"));
-            this.defaultExdr = new FlexibleStringExpander(setElement.getAttribute("default"));
+            this.defaultExdr = FlexibleStringExpander.getInstance(setElement.getAttribute("default"));
             noLocale = "true".equals(setElement.getAttribute("no-locale"));
             this.argListAcsr = new FlexibleMapAccessor<List<? extends Object>>(setElement.getAttribute("arg-list-name"));
-            this.globalExdr = new FlexibleStringExpander(setElement.getAttribute("global"));
+            this.globalExdr = FlexibleStringExpander.getInstance(setElement.getAttribute("global"));
         }
         
         public void runAction(Map<String, Object> context) {
@@ -351,9 +351,9 @@
         
         public Service(ModelMenu modelMenu, Element serviceElement) {
             super (modelMenu, serviceElement);
-            this.serviceNameExdr = new FlexibleStringExpander(serviceElement.getAttribute("service-name"));
+            this.serviceNameExdr = FlexibleStringExpander.getInstance(serviceElement.getAttribute("service-name"));
             this.resultMapNameAcsr = UtilValidate.isNotEmpty(serviceElement.getAttribute("result-map-name")) ? new FlexibleMapAccessor<Map<String, Object>>(serviceElement.getAttribute("result-map-name")) : null;
-            this.autoFieldMapExdr = new FlexibleStringExpander(serviceElement.getAttribute("auto-field-map"));
+            this.autoFieldMapExdr = FlexibleStringExpander.getInstance(serviceElement.getAttribute("auto-field-map"));
             
             List<? extends Element> fieldMapElementList = UtilXml.childElementList(serviceElement, "field-map");
             if (fieldMapElementList.size() > 0) {

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuCondition.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuCondition.java?rev=687422&r1=687421&r2=687422&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuCondition.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuCondition.java Wed Aug 20 11:50:04 2008
@@ -60,8 +60,8 @@
 
     public ModelMenuCondition(ModelMenuItem modelMenuItem, Element conditionElement) {
         this.modelMenuItem = modelMenuItem;
-        this.passStyleExdr = new FlexibleStringExpander(conditionElement.getAttribute("pass-style"));
-        this.failStyleExdr = new FlexibleStringExpander(conditionElement.getAttribute("disabled-style"));
+        this.passStyleExdr = FlexibleStringExpander.getInstance(conditionElement.getAttribute("pass-style"));
+        this.failStyleExdr = FlexibleStringExpander.getInstance(conditionElement.getAttribute("disabled-style"));
         Element firstChildElement = UtilXml.firstChildElement(conditionElement);
         this.rootCondition = readCondition(modelMenuItem, firstChildElement);
     }
@@ -232,9 +232,9 @@
 
         public IfServicePermission(ModelMenuItem modelMenuItem, Element condElement) {
             super(modelMenuItem, condElement);
-            this.serviceExdr = new FlexibleStringExpander(condElement.getAttribute("service-name"));
-            this.actionExdr = new FlexibleStringExpander(condElement.getAttribute("main-action"));
-            this.resExdr = new FlexibleStringExpander(condElement.getAttribute("resource-description"));            
+            this.serviceExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("service-name"));
+            this.actionExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("main-action"));
+            this.resExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("resource-description"));            
         }
 
         public boolean eval(Map<String, Object> context) {
@@ -302,8 +302,8 @@
         
         public IfHasPermission(ModelMenuItem modelMenuItem, Element condElement) {
             super (modelMenuItem, condElement);
-            this.permissionExdr = new FlexibleStringExpander(condElement.getAttribute("permission"));
-            this.actionExdr = new FlexibleStringExpander(condElement.getAttribute("action"));
+            this.permissionExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("permission"));
+            this.actionExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("action"));
         }
         
         public boolean eval(Map<String, Object> context) {
@@ -338,8 +338,8 @@
         public IfValidateMethod(ModelMenuItem modelMenuItem, Element condElement) {
             super (modelMenuItem, condElement);
             this.fieldAcsr = new FlexibleMapAccessor<Object>(condElement.getAttribute("field-name"));
-            this.methodExdr = new FlexibleStringExpander(condElement.getAttribute("method"));
-            this.classExdr = new FlexibleStringExpander(condElement.getAttribute("class"));
+            this.methodExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("method"));
+            this.classExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("class"));
         }
         
         public boolean eval(Map<String, Object> context) {
@@ -400,12 +400,12 @@
         public IfCompare(ModelMenuItem modelMenuItem, Element condElement) {
             super (modelMenuItem, condElement);
             this.fieldAcsr = new FlexibleMapAccessor<Object>(condElement.getAttribute("field-name"));
-            this.valueExdr = new FlexibleStringExpander(condElement.getAttribute("value"));
+            this.valueExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("value"));
             
             this.operator = condElement.getAttribute("operator");
             this.type = condElement.getAttribute("type");
 
-            this.formatExdr = new FlexibleStringExpander(condElement.getAttribute("format"));
+            this.formatExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("format"));
         }
         
         public boolean eval(Map<String, Object> context) {
@@ -454,7 +454,7 @@
             this.operator = condElement.getAttribute("operator");
             this.type = condElement.getAttribute("type");
 
-            this.formatExdr = new FlexibleStringExpander(condElement.getAttribute("format"));
+            this.formatExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("format"));
         }
         
         public boolean eval(Map<String, Object> context) {
@@ -497,7 +497,7 @@
         public IfRegexp(ModelMenuItem modelMenuItem, Element condElement) {
             super (modelMenuItem, condElement);
             this.fieldAcsr = new FlexibleMapAccessor<Object>(condElement.getAttribute("field-name"));
-            this.exprExdr = new FlexibleStringExpander(condElement.getAttribute("expr"));
+            this.exprExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("expr"));
         }
         
         public boolean eval(Map<String, Object> context) {

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuItem.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuItem.java?rev=687422&r1=687421&r2=687422&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuItem.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuItem.java Wed Aug 20 11:50:04 2008
@@ -441,7 +441,7 @@
      * @param string
      */
     public void setTitle(String string) {
-        this.title = new FlexibleStringExpander(string);
+        this.title = FlexibleStringExpander.getInstance(string);
     }
 
     /**
@@ -455,7 +455,7 @@
      * @param string
      */
     public void setTooltip(String string) {
-        this.tooltip = new FlexibleStringExpander(string);
+        this.tooltip = FlexibleStringExpander.getInstance(string);
     }
 
 
@@ -478,7 +478,7 @@
      * @param string
      */
     public void setAssociatedContentId(String string) {
-        this.associatedContentId = new FlexibleStringExpander(string);
+        this.associatedContentId = FlexibleStringExpander.getInstance(string);
     }
 
     /**
@@ -659,27 +659,27 @@
 
         public void setText(String val) {
             String textAttr = UtilFormatOut.checkNull(val);
-            this.textExdr = new FlexibleStringExpander(textAttr);
+            this.textExdr = FlexibleStringExpander.getInstance(textAttr);
         }
 
         public void setId(String val) {
-            this.idExdr = new FlexibleStringExpander(val);
+            this.idExdr = FlexibleStringExpander.getInstance(val);
         }
 
         public void setStyle(String val) {
-            this.styleExdr = new FlexibleStringExpander(val);
+            this.styleExdr = FlexibleStringExpander.getInstance(val);
         }
 
         public void setTarget(String val) {
-            this.targetExdr = new FlexibleStringExpander(val);
+            this.targetExdr = FlexibleStringExpander.getInstance(val);
         }
 
         public void setTargetWindow(String val) {
-            this.targetWindowExdr = new FlexibleStringExpander(val);
+            this.targetWindowExdr = FlexibleStringExpander.getInstance(val);
         }
 
         public void setPrefix(String val) {
-            this.prefixExdr = new FlexibleStringExpander(val);
+            this.prefixExdr = FlexibleStringExpander.getInstance(val);
         }
 
         public void setUrlMode(String val) {
@@ -688,7 +688,7 @@
         }
 
         public void setName(String val) {
-            this.nameExdr = new FlexibleStringExpander(val);
+            this.nameExdr = FlexibleStringExpander.getInstance(val);
         }
 
         public void setFullPath(String val) {
@@ -781,27 +781,27 @@
 
         public void setSrc(String val) {
             String textAttr = UtilFormatOut.checkNull(val);
-            this.srcExdr = new FlexibleStringExpander(textAttr);
+            this.srcExdr = FlexibleStringExpander.getInstance(textAttr);
         }
 
         public void setId(String val) {
-            this.idExdr = new FlexibleStringExpander(val);
+            this.idExdr = FlexibleStringExpander.getInstance(val);
         }
 
         public void setStyle(String val) {
-            this.styleExdr = new FlexibleStringExpander(val);
+            this.styleExdr = FlexibleStringExpander.getInstance(val);
         }
 
         public void setWidth(String val) {
-            this.widthExdr = new FlexibleStringExpander(val);
+            this.widthExdr = FlexibleStringExpander.getInstance(val);
         }
 
         public void setHeight(String val) {
-            this.heightExdr = new FlexibleStringExpander(val);
+            this.heightExdr = FlexibleStringExpander.getInstance(val);
         }
 
         public void setBorder(String val) {
-            this.borderExdr = new FlexibleStringExpander(val);
+            this.borderExdr = FlexibleStringExpander.getInstance(val);
         }
 
         public void setUrlMode(String val) {

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java?rev=687422&r1=687421&r2=687422&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java Wed Aug 20 11:50:04 2008
@@ -131,7 +131,7 @@
         
         public HtmlTemplate(ModelScreen modelScreen, Element htmlTemplateElement) {
             super(modelScreen, htmlTemplateElement);
-            this.locationExdr = new FlexibleStringExpander(htmlTemplateElement.getAttribute("location"));
+            this.locationExdr = FlexibleStringExpander.getInstance(htmlTemplateElement.getAttribute("location"));
         }
 
         public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) {
@@ -149,7 +149,7 @@
         
         public HtmlTemplateDecorator(ModelScreen modelScreen, Element htmlTemplateDecoratorElement) {
             super(modelScreen, htmlTemplateDecoratorElement);
-            this.locationExdr = new FlexibleStringExpander(htmlTemplateDecoratorElement.getAttribute("location"));
+            this.locationExdr = FlexibleStringExpander.getInstance(htmlTemplateDecoratorElement.getAttribute("location"));
             
             List htmlTemplateDecoratorSectionElementList = UtilXml.childElementList(htmlTemplateDecoratorElement, "html-template-decorator-section");
             Iterator htmlTemplateDecoratorSectionElementIter = htmlTemplateDecoratorSectionElementList.iterator();

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java?rev=687422&r1=687421&r2=687422&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java Wed Aug 20 11:50:04 2008
@@ -70,10 +70,10 @@
     public IterateSectionWidget(ModelScreen modelScreen, Element iterateSectionElement) {
         super(modelScreen, iterateSectionElement);
         listNameExdr = new FlexibleMapAccessor<Object>(iterateSectionElement.getAttribute("list-name"));
-        entryNameExdr = new FlexibleStringExpander(iterateSectionElement.getAttribute("entry-name"));
-        keyNameExdr = new FlexibleStringExpander(iterateSectionElement.getAttribute("key-name"));
+        entryNameExdr = FlexibleStringExpander.getInstance(iterateSectionElement.getAttribute("entry-name"));
+        keyNameExdr = FlexibleStringExpander.getInstance(iterateSectionElement.getAttribute("key-name"));
         if (this.paginateTarget == null || iterateSectionElement.hasAttribute("paginate-target"))
-            this.paginateTarget = new FlexibleStringExpander(iterateSectionElement.getAttribute("paginate-target"));
+            this.paginateTarget = FlexibleStringExpander.getInstance(iterateSectionElement.getAttribute("paginate-target"));
         
         paginate = "true".equals(iterateSectionElement.getAttribute("paginate"));
         if (iterateSectionElement.hasAttribute("view-size"))

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreen.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreen.java?rev=687422&r1=687421&r2=687422&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreen.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreen.java Wed Aug 20 11:50:04 2008
@@ -63,7 +63,7 @@
     public ModelScreen(Element screenElement, Map modelScreenMap, String sourceLocation) {
         super(screenElement);
         this.sourceLocation = sourceLocation;
-        this.transactionTimeoutExdr = new FlexibleStringExpander(screenElement.getAttribute("transaction-timeout"));
+        this.transactionTimeoutExdr = FlexibleStringExpander.getInstance(screenElement.getAttribute("transaction-timeout"));
         this.modelScreenMap = modelScreenMap;
         this.useCache = "true".equals(screenElement.getAttribute("use-cache"));
 

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java?rev=687422&r1=687421&r2=687422&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java Wed Aug 20 11:50:04 2008
@@ -138,9 +138,9 @@
             super (modelScreen, setElement);
             this.field = new FlexibleMapAccessor<Object>(setElement.getAttribute("field"));
             this.fromField = new FlexibleMapAccessor<Object>(setElement.getAttribute("from-field"));
-            this.valueExdr = new FlexibleStringExpander(setElement.getAttribute("value"));
-            this.defaultExdr = new FlexibleStringExpander(setElement.getAttribute("default-value"));
-            this.globalExdr = new FlexibleStringExpander(setElement.getAttribute("global"));
+            this.valueExdr = FlexibleStringExpander.getInstance(setElement.getAttribute("value"));
+            this.defaultExdr = FlexibleStringExpander.getInstance(setElement.getAttribute("default-value"));
+            this.globalExdr = FlexibleStringExpander.getInstance(setElement.getAttribute("global"));
             this.type = setElement.getAttribute("type");
             this.toScope = setElement.getAttribute("to-scope");
             this.fromScope = setElement.getAttribute("from-scope");
@@ -285,9 +285,9 @@
         
         public PropertyMap(ModelScreen modelScreen, Element setElement) {
             super (modelScreen, setElement);
-            this.resourceExdr = new FlexibleStringExpander(setElement.getAttribute("resource"));
+            this.resourceExdr = FlexibleStringExpander.getInstance(setElement.getAttribute("resource"));
             this.mapNameAcsr = new FlexibleMapAccessor<ResourceBundleMapWrapper>(setElement.getAttribute("map-name"));
-            this.globalExdr = new FlexibleStringExpander(setElement.getAttribute("global"));
+            this.globalExdr = FlexibleStringExpander.getInstance(setElement.getAttribute("global"));
         }
         
         public void runAction(Map<String, Object> context) {
@@ -335,13 +335,13 @@
 
         public PropertyToField(ModelScreen modelScreen, Element setElement) {
             super (modelScreen, setElement);
-            this.resourceExdr = new FlexibleStringExpander(setElement.getAttribute("resource"));
-            this.propertyExdr = new FlexibleStringExpander(setElement.getAttribute("property"));
+            this.resourceExdr = FlexibleStringExpander.getInstance(setElement.getAttribute("resource"));
+            this.propertyExdr = FlexibleStringExpander.getInstance(setElement.getAttribute("property"));
             this.fieldAcsr = new FlexibleMapAccessor<Object>(setElement.getAttribute("field"));
-            this.defaultExdr = new FlexibleStringExpander(setElement.getAttribute("default"));
+            this.defaultExdr = FlexibleStringExpander.getInstance(setElement.getAttribute("default"));
             noLocale = "true".equals(setElement.getAttribute("no-locale"));
             this.argListAcsr = new FlexibleMapAccessor<List<? extends Object>>(setElement.getAttribute("arg-list-name"));
-            this.globalExdr = new FlexibleStringExpander(setElement.getAttribute("global"));
+            this.globalExdr = FlexibleStringExpander.getInstance(setElement.getAttribute("global"));
         }
         
         public void runAction(Map<String, Object> context) {
@@ -429,9 +429,9 @@
         
         public Service(ModelScreen modelScreen, Element serviceElement) {
             super (modelScreen, serviceElement);
-            this.serviceNameExdr = new FlexibleStringExpander(serviceElement.getAttribute("service-name"));
+            this.serviceNameExdr = FlexibleStringExpander.getInstance(serviceElement.getAttribute("service-name"));
             this.resultMapNameAcsr = UtilValidate.isNotEmpty(serviceElement.getAttribute("result-map-name")) ? new FlexibleMapAccessor<Map<String, Object>>(serviceElement.getAttribute("result-map-name")) : null;
-            this.autoFieldMapExdr = new FlexibleStringExpander(serviceElement.getAttribute("auto-field-map"));
+            this.autoFieldMapExdr = FlexibleStringExpander.getInstance(serviceElement.getAttribute("auto-field-map"));
             this.fieldMap = EntityFinderUtil.makeFieldMap(serviceElement);
         }
         

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenCondition.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenCondition.java?rev=687422&r1=687421&r2=687422&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenCondition.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenCondition.java Wed Aug 20 11:50:04 2008
@@ -214,10 +214,10 @@
 
         public IfServicePermission(ModelScreen modelScreen, Element condElement) {
             super(modelScreen, condElement);
-            this.serviceExdr = new FlexibleStringExpander(condElement.getAttribute("service-name"));
-            this.actionExdr = new FlexibleStringExpander(condElement.getAttribute("main-action"));
-            this.ctxMapExdr = new FlexibleStringExpander(condElement.getAttribute("context-map"));
-            this.resExdr = new FlexibleStringExpander(condElement.getAttribute("resource-description"));
+            this.serviceExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("service-name"));
+            this.actionExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("main-action"));
+            this.ctxMapExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("context-map"));
+            this.resExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("resource-description"));
         }
 
         public boolean eval(Map<String, Object> context) {
@@ -295,8 +295,8 @@
         
         public IfHasPermission(ModelScreen modelScreen, Element condElement) {
             super (modelScreen, condElement);
-            this.permissionExdr = new FlexibleStringExpander(condElement.getAttribute("permission"));
-            this.actionExdr = new FlexibleStringExpander(condElement.getAttribute("action"));
+            this.permissionExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("permission"));
+            this.actionExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("action"));
         }
         
         public boolean eval(Map<String, Object> context) {
@@ -331,8 +331,8 @@
         public IfValidateMethod(ModelScreen modelScreen, Element condElement) {
             super (modelScreen, condElement);
             this.fieldAcsr = new FlexibleMapAccessor<Object>(condElement.getAttribute("field-name"));
-            this.methodExdr = new FlexibleStringExpander(condElement.getAttribute("method"));
-            this.classExdr = new FlexibleStringExpander(condElement.getAttribute("class"));
+            this.methodExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("method"));
+            this.classExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("class"));
         }
         
         public boolean eval(Map<String, Object> context) {
@@ -393,12 +393,12 @@
         public IfCompare(ModelScreen modelScreen, Element condElement) {
             super (modelScreen, condElement);
             this.fieldAcsr = new FlexibleMapAccessor<Object>(condElement.getAttribute("field-name"));
-            this.valueExdr = new FlexibleStringExpander(condElement.getAttribute("value"));
+            this.valueExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("value"));
             
             this.operator = condElement.getAttribute("operator");
             this.type = condElement.getAttribute("type");
 
-            this.formatExdr = new FlexibleStringExpander(condElement.getAttribute("format"));
+            this.formatExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("format"));
         }
         
         public boolean eval(Map<String, Object> context) {
@@ -447,7 +447,7 @@
             this.operator = condElement.getAttribute("operator");
             this.type = condElement.getAttribute("type");
 
-            this.formatExdr = new FlexibleStringExpander(condElement.getAttribute("format"));
+            this.formatExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("format"));
         }
         
         public boolean eval(Map<String, Object> context) {
@@ -490,7 +490,7 @@
         public IfRegexp(ModelScreen modelScreen, Element condElement) {
             super (modelScreen, condElement);
             this.fieldAcsr = new FlexibleMapAccessor<Object>(condElement.getAttribute("field-name"));
-            this.exprExdr = new FlexibleStringExpander(condElement.getAttribute("expr"));
+            this.exprExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("expr"));
         }
         
         public boolean eval(Map<String, Object> context) {

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java?rev=687422&r1=687421&r2=687422&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java Wed Aug 20 11:50:04 2008
@@ -274,9 +274,9 @@
         
         public Container(ModelScreen modelScreen, Element containerElement) {
             super(modelScreen, containerElement);
-            this.idExdr = new FlexibleStringExpander(containerElement.getAttribute("id"));
-            this.styleExdr = new FlexibleStringExpander(containerElement.getAttribute("style"));
-            this.autoUpdateTargetExdr = new FlexibleStringExpander(containerElement.getAttribute("auto-update-target"));
+            this.idExdr = FlexibleStringExpander.getInstance(containerElement.getAttribute("id"));
+            this.styleExdr = FlexibleStringExpander.getInstance(containerElement.getAttribute("style"));
+            this.autoUpdateTargetExdr = FlexibleStringExpander.getInstance(containerElement.getAttribute("auto-update-target"));
             if (containerElement.hasAttribute("auto-update-interval")) {
                 this.autoUpdateInterval = containerElement.getAttribute("auto-update-interval");
             }
@@ -336,7 +336,7 @@
         
         public Screenlet(ModelScreen modelScreen, Element screenletElement) {
             super(modelScreen, screenletElement);
-            this.idExdr = new FlexibleStringExpander(screenletElement.getAttribute("id"));
+            this.idExdr = FlexibleStringExpander.getInstance(screenletElement.getAttribute("id"));
             this.collapsible = "true".equals(screenletElement.getAttribute("collapsible"));
             this.initiallyCollapsed = "true".equals(screenletElement.getAttribute("initially-collapsed"));
             if (this.initiallyCollapsed) {
@@ -346,7 +346,7 @@
             if (this.collapsible && UtilValidate.isEmpty(this.name) && idExdr.isEmpty()) {
                 throw new IllegalArgumentException("Collapsible screenlets must have a name or id [" + this.modelScreen.getName() + "]");
             }
-            this.titleExdr = new FlexibleStringExpander(screenletElement.getAttribute("title"));
+            this.titleExdr = FlexibleStringExpander.getInstance(screenletElement.getAttribute("title"));
             List subElementList = UtilXml.childElementList(screenletElement);
             this.subWidgets = ModelScreenWidget.readSubWidgets(this.modelScreen, subElementList);
             String navMenuName = screenletElement.getAttribute("navigation-menu-name");
@@ -460,8 +460,8 @@
         
         public HorizontalSeparator(ModelScreen modelScreen, Element separatorElement) {
             super(modelScreen, separatorElement);
-            this.idExdr = new FlexibleStringExpander(separatorElement.getAttribute("id"));
-            this.styleExdr = new FlexibleStringExpander(separatorElement.getAttribute("style"));
+            this.idExdr = FlexibleStringExpander.getInstance(separatorElement.getAttribute("id"));
+            this.styleExdr = FlexibleStringExpander.getInstance(separatorElement.getAttribute("style"));
         }
 
         public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) throws GeneralException, IOException {
@@ -489,9 +489,9 @@
         
         public IncludeScreen(ModelScreen modelScreen, Element includeScreenElement) {
             super(modelScreen, includeScreenElement);
-            this.nameExdr = new FlexibleStringExpander(includeScreenElement.getAttribute("name"));
-            this.locationExdr = new FlexibleStringExpander(includeScreenElement.getAttribute("location"));
-            this.shareScopeExdr = new FlexibleStringExpander(includeScreenElement.getAttribute("share-scope"));
+            this.nameExdr = FlexibleStringExpander.getInstance(includeScreenElement.getAttribute("name"));
+            this.locationExdr = FlexibleStringExpander.getInstance(includeScreenElement.getAttribute("location"));
+            this.shareScopeExdr = FlexibleStringExpander.getInstance(includeScreenElement.getAttribute("share-scope"));
         }
 
         public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) throws GeneralException, IOException {
@@ -588,8 +588,8 @@
         
         public DecoratorScreen(ModelScreen modelScreen, Element decoratorScreenElement) {
             super(modelScreen, decoratorScreenElement);
-            this.nameExdr = new FlexibleStringExpander(decoratorScreenElement.getAttribute("name"));
-            this.locationExdr = new FlexibleStringExpander(decoratorScreenElement.getAttribute("location"));
+            this.nameExdr = FlexibleStringExpander.getInstance(decoratorScreenElement.getAttribute("name"));
+            this.locationExdr = FlexibleStringExpander.getInstance(decoratorScreenElement.getAttribute("location"));
             
             List decoratorSectionElementList = UtilXml.childElementList(decoratorScreenElement, "decorator-section");
             Iterator decoratorSectionElementIter = decoratorSectionElementList.iterator();
@@ -736,10 +736,10 @@
             // put the text attribute first, then the pcdata under the element, if both are there of course
             String textAttr = UtilFormatOut.checkNull(labelElement.getAttribute("text"));
             String pcdata = UtilFormatOut.checkNull(UtilXml.elementValue(labelElement));
-            this.textExdr = new FlexibleStringExpander(textAttr + pcdata);
+            this.textExdr = FlexibleStringExpander.getInstance(textAttr + pcdata);
 
-            this.idExdr = new FlexibleStringExpander(labelElement.getAttribute("id"));
-            this.styleExdr = new FlexibleStringExpander(labelElement.getAttribute("style"));
+            this.idExdr = FlexibleStringExpander.getInstance(labelElement.getAttribute("id"));
+            this.styleExdr = FlexibleStringExpander.getInstance(labelElement.getAttribute("style"));
         }
 
         public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) {
@@ -779,9 +779,9 @@
         public Form(ModelScreen modelScreen, Element formElement) {
             super(modelScreen, formElement);
 
-            this.nameExdr = new FlexibleStringExpander(formElement.getAttribute("name"));
-            this.locationExdr = new FlexibleStringExpander(formElement.getAttribute("location"));
-            this.shareScopeExdr = new FlexibleStringExpander(formElement.getAttribute("share-scope"));
+            this.nameExdr = FlexibleStringExpander.getInstance(formElement.getAttribute("name"));
+            this.locationExdr = FlexibleStringExpander.getInstance(formElement.getAttribute("location"));
+            this.shareScopeExdr = FlexibleStringExpander.getInstance(formElement.getAttribute("share-scope"));
         }
 
         public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) {
@@ -865,9 +865,9 @@
         public Tree(ModelScreen modelScreen, Element treeElement) {
             super(modelScreen, treeElement);
 
-            this.nameExdr = new FlexibleStringExpander(treeElement.getAttribute("name"));
-            this.locationExdr = new FlexibleStringExpander(treeElement.getAttribute("location"));
-            this.shareScopeExdr = new FlexibleStringExpander(treeElement.getAttribute("share-scope"));
+            this.nameExdr = FlexibleStringExpander.getInstance(treeElement.getAttribute("name"));
+            this.locationExdr = FlexibleStringExpander.getInstance(treeElement.getAttribute("location"));
+            this.shareScopeExdr = FlexibleStringExpander.getInstance(treeElement.getAttribute("share-scope"));
         }
 
         public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) throws GeneralException, IOException {
@@ -1024,11 +1024,11 @@
             super(modelScreen, subContentElement);
 
             // put the text attribute first, then the pcdata under the element, if both are there of course
-            this.contentId = new FlexibleStringExpander(subContentElement.getAttribute("content-id"));
-            this.dataResourceId = new FlexibleStringExpander(subContentElement.getAttribute("dataresource-id"));
-            this.editRequest = new FlexibleStringExpander(subContentElement.getAttribute("edit-request"));
-            this.editContainerStyle = new FlexibleStringExpander(subContentElement.getAttribute("edit-container-style"));
-            this.enableEditName = new FlexibleStringExpander(subContentElement.getAttribute("enable-edit-name"));
+            this.contentId = FlexibleStringExpander.getInstance(subContentElement.getAttribute("content-id"));
+            this.dataResourceId = FlexibleStringExpander.getInstance(subContentElement.getAttribute("dataresource-id"));
+            this.editRequest = FlexibleStringExpander.getInstance(subContentElement.getAttribute("edit-request"));
+            this.editContainerStyle = FlexibleStringExpander.getInstance(subContentElement.getAttribute("edit-container-style"));
+            this.enableEditName = FlexibleStringExpander.getInstance(subContentElement.getAttribute("enable-edit-name"));
             this.xmlEscape = "true".equals(subContentElement.getAttribute("xml-escape"));
             this.width = subContentElement.getAttribute("width");
             if (UtilValidate.isEmpty(this.width)) this.width="60%";
@@ -1077,7 +1077,7 @@
                 GenericValue dataResource = null;
                 if (UtilValidate.isNotEmpty(expandedDataResourceId)) {
                  dataResource = delegator.findByPrimaryKeyCache("DataResource", UtilMisc.toMap("dataResourceId", expandedDataResourceId));
-                    this.dataResourceId = new FlexibleStringExpander(expandedDataResourceId);
+                    this.dataResourceId = FlexibleStringExpander.getInstance(expandedDataResourceId);
                 }
                 
                 String mimeTypeId = null;
@@ -1161,14 +1161,14 @@
             super(modelScreen, subContentElement);
 
             // put the text attribute first, then the pcdata under the element, if both are there of course
-            this.contentId = new FlexibleStringExpander(UtilFormatOut.checkNull(subContentElement.getAttribute("content-id")));
-            this.mapKey = new FlexibleStringExpander(UtilFormatOut.checkNull(subContentElement.getAttribute("map-key")));
+            this.contentId = FlexibleStringExpander.getInstance(UtilFormatOut.checkNull(subContentElement.getAttribute("content-id")));
+            this.mapKey = FlexibleStringExpander.getInstance(UtilFormatOut.checkNull(subContentElement.getAttribute("map-key")));
             if (this.mapKey.isEmpty()) {
-                this.mapKey = new FlexibleStringExpander(UtilFormatOut.checkNull(subContentElement.getAttribute("assoc-name")));
+                this.mapKey = FlexibleStringExpander.getInstance(UtilFormatOut.checkNull(subContentElement.getAttribute("assoc-name")));
             }
-            this.editRequest = new FlexibleStringExpander(UtilFormatOut.checkNull(subContentElement.getAttribute("edit-request")));
-            this.editContainerStyle = new FlexibleStringExpander(subContentElement.getAttribute("edit-container-style"));
-            this.enableEditName = new FlexibleStringExpander(subContentElement.getAttribute("enable-edit-name"));
+            this.editRequest = FlexibleStringExpander.getInstance(UtilFormatOut.checkNull(subContentElement.getAttribute("edit-request")));
+            this.editContainerStyle = FlexibleStringExpander.getInstance(subContentElement.getAttribute("edit-container-style"));
+            this.enableEditName = FlexibleStringExpander.getInstance(subContentElement.getAttribute("enable-edit-name"));
             this.xmlEscape = "true".equals(subContentElement.getAttribute("xml-escape"));
         }
 
@@ -1222,8 +1222,8 @@
         public Menu(ModelScreen modelScreen, Element menuElement) {
             super(modelScreen, menuElement);
 
-            this.nameExdr = new FlexibleStringExpander(menuElement.getAttribute("name"));
-            this.locationExdr = new FlexibleStringExpander(menuElement.getAttribute("location"));
+            this.nameExdr = FlexibleStringExpander.getInstance(menuElement.getAttribute("name"));
+            this.locationExdr = FlexibleStringExpander.getInstance(menuElement.getAttribute("location"));
         }
 
         public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) throws IOException {
@@ -1378,25 +1378,25 @@
 
         public void setText(String val) {
             String textAttr = UtilFormatOut.checkNull(val);
-            this.textExdr = new FlexibleStringExpander(textAttr);
+            this.textExdr = FlexibleStringExpander.getInstance(textAttr);
         }
         public void setId(String val) {
-            this.idExdr = new FlexibleStringExpander(val);
+            this.idExdr = FlexibleStringExpander.getInstance(val);
         }
         public void setStyle(String val) {
-            this.styleExdr = new FlexibleStringExpander(val);
+            this.styleExdr = FlexibleStringExpander.getInstance(val);
         }
         public void setTarget(String val) {
-            this.targetExdr = new FlexibleStringExpander(val);
+            this.targetExdr = FlexibleStringExpander.getInstance(val);
         }
         public void setName(String val) {
-            this.nameExdr = new FlexibleStringExpander(val);
+            this.nameExdr = FlexibleStringExpander.getInstance(val);
         }
         public void setTargetWindow(String val) {
-            this.targetWindowExdr = new FlexibleStringExpander(val);
+            this.targetWindowExdr = FlexibleStringExpander.getInstance(val);
         }
         public void setPrefix(String val) {
-            this.prefixExdr = new FlexibleStringExpander(val);
+            this.prefixExdr = FlexibleStringExpander.getInstance(val);
         }
         public void setUrlMode(String val) {
             if (UtilValidate.isNotEmpty(val))
@@ -1497,22 +1497,22 @@
         
         public void setSrc(String val) {
             String textAttr = UtilFormatOut.checkNull(val);
-            this.srcExdr = new FlexibleStringExpander(textAttr);
+            this.srcExdr = FlexibleStringExpander.getInstance(textAttr);
         }
         public void setId(String val) {
-            this.idExdr = new FlexibleStringExpander(val);
+            this.idExdr = FlexibleStringExpander.getInstance(val);
         }
         public void setStyle(String val) {
-            this.styleExdr = new FlexibleStringExpander(val);
+            this.styleExdr = FlexibleStringExpander.getInstance(val);
         }
         public void setWidth(String val) {
-            this.widthExdr = new FlexibleStringExpander(val);
+            this.widthExdr = FlexibleStringExpander.getInstance(val);
         }
         public void setHeight(String val) {
-            this.heightExdr = new FlexibleStringExpander(val);
+            this.heightExdr = FlexibleStringExpander.getInstance(val);
         }
         public void setBorder(String val) {
-            this.borderExdr = new FlexibleStringExpander(val);
+            this.borderExdr = FlexibleStringExpander.getInstance(val);
         }
         public void setUrlMode(String val) {
             if (UtilValidate.isEmpty(val)) {

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java?rev=687422&r1=687421&r2=687422&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java Wed Aug 20 11:50:04 2008
@@ -96,9 +96,9 @@
             if (UtilValidate.isNotEmpty(rStyle))
                 this.defaultRenderStyle = rStyle;
         }
-        this.defaultWrapStyleExdr = new FlexibleStringExpander(treeElement.getAttribute("default-wrap-style"));
-        this.expandCollapseRequestExdr = new FlexibleStringExpander(treeElement.getAttribute("expand-collapse-request"));
-        this.trailNameExdr = new FlexibleStringExpander(UtilFormatOut.checkEmpty(treeElement.getAttribute("trail-name"), "trail"));
+        this.defaultWrapStyleExdr = FlexibleStringExpander.getInstance(treeElement.getAttribute("default-wrap-style"));
+        this.expandCollapseRequestExdr = FlexibleStringExpander.getInstance(treeElement.getAttribute("expand-collapse-request"));
+        this.trailNameExdr = FlexibleStringExpander.getInstance(UtilFormatOut.checkEmpty(treeElement.getAttribute("trail-name"), "trail"));
         this.delegator = delegator;
         this.dispatcher = dispatcher;
         this.forceChildCheck = !"false".equals(treeElement.getAttribute("force-child-check"));
@@ -285,7 +285,7 @@
             this.modelTree = modelTree;
             this.name = nodeElement.getAttribute("name");
             this.expandCollapseStyle = nodeElement.getAttribute("expand-collapse-style");
-            this.wrapStyleExdr = new FlexibleStringExpander(nodeElement.getAttribute("wrap-style"));
+            this.wrapStyleExdr = FlexibleStringExpander.getInstance(nodeElement.getAttribute("wrap-style"));
             this.renderStyle = nodeElement.getAttribute("render-style");
             this.entryName = UtilFormatOut.checkEmpty(nodeElement.getAttribute("entry-name"), null);
             setEntityName(nodeElement.getAttribute("entity-name"));
@@ -309,8 +309,8 @@
         
             Element screenElement = UtilXml.firstChildElement(nodeElement, "include-screen");
             if (screenElement != null) {
-                this.screenNameExdr =  new FlexibleStringExpander(screenElement.getAttribute("name"));
-                this.screenLocationExdr =  new FlexibleStringExpander(screenElement.getAttribute("location"));
+                this.screenNameExdr =  FlexibleStringExpander.getInstance(screenElement.getAttribute("name"));
+                this.screenLocationExdr =  FlexibleStringExpander.getInstance(screenElement.getAttribute("location"));
                 this.shareScope =  screenElement.getAttribute("share-scope");
             }
             
@@ -691,7 +691,7 @@
             public ModelSubNode(Element nodeElement, ModelNode modelNode) {
     
                 this.rootNode = modelNode;
-                this.nodeNameExdr = new FlexibleStringExpander(nodeElement.getAttribute("node-name"));
+                this.nodeNameExdr = FlexibleStringExpander.getInstance(nodeElement.getAttribute("node-name"));
         
                 Element actionElement = UtilXml.firstChildElement(nodeElement, "entity-and");
                 if (actionElement != null) {
@@ -747,10 +747,10 @@
                 // put the text attribute first, then the pcdata under the element, if both are there of course
                 String textAttr = UtilFormatOut.checkNull(labelElement.getAttribute("text"));
                 String pcdata = UtilFormatOut.checkNull(UtilXml.elementValue(labelElement));
-                this.textExdr = new FlexibleStringExpander(textAttr + pcdata);
+                this.textExdr = FlexibleStringExpander.getInstance(textAttr + pcdata);
     
-                this.idExdr = new FlexibleStringExpander(labelElement.getAttribute("id"));
-                this.styleExdr = new FlexibleStringExpander(labelElement.getAttribute("style"));
+                this.idExdr = FlexibleStringExpander.getInstance(labelElement.getAttribute("id"));
+                this.styleExdr = FlexibleStringExpander.getInstance(labelElement.getAttribute("style"));
             }
     
             public void renderLabelString(Appendable writer, Map<String, Object> context, TreeStringRenderer treeStringRenderer) {
@@ -891,28 +891,28 @@
 
             public void setText(String val) {
                 String textAttr = UtilFormatOut.checkNull(val);
-                this.textExdr = new FlexibleStringExpander(textAttr);
+                this.textExdr = FlexibleStringExpander.getInstance(textAttr);
             }
             public void setId(String val) {
-                this.idExdr = new FlexibleStringExpander(val);
+                this.idExdr = FlexibleStringExpander.getInstance(val);
             }
             public void setStyle(String val) {
-                this.styleExdr = new FlexibleStringExpander(val);
+                this.styleExdr = FlexibleStringExpander.getInstance(val);
             }
             public void setName(String val) {
-                this.nameExdr = new FlexibleStringExpander(val);
+                this.nameExdr = FlexibleStringExpander.getInstance(val);
             }
             public void setTitle(String val) {
-                this.titleExdr = new FlexibleStringExpander(val);
+                this.titleExdr = FlexibleStringExpander.getInstance(val);
             }
             public void setTarget(String val) {
-                this.targetExdr = new FlexibleStringExpander(val);
+                this.targetExdr = FlexibleStringExpander.getInstance(val);
             }
             public void setTargetWindow(String val) {
-                this.targetWindowExdr = new FlexibleStringExpander(val);
+                this.targetWindowExdr = FlexibleStringExpander.getInstance(val);
             }
             public void setPrefix(String val) {
-                this.prefixExdr = new FlexibleStringExpander(val);
+                this.prefixExdr = FlexibleStringExpander.getInstance(val);
             }
             public void setUrlMode(String val) {
                 if (UtilValidate.isNotEmpty(val))
@@ -1020,22 +1020,22 @@
             
             public void setSrc(String val) {
                 String textAttr = UtilFormatOut.checkNull(val);
-                this.srcExdr = new FlexibleStringExpander(textAttr);
+                this.srcExdr = FlexibleStringExpander.getInstance(textAttr);
             }
             public void setId(String val) {
-                this.idExdr = new FlexibleStringExpander(val);
+                this.idExdr = FlexibleStringExpander.getInstance(val);
             }
             public void setStyle(String val) {
-                this.styleExdr = new FlexibleStringExpander(val);
+                this.styleExdr = FlexibleStringExpander.getInstance(val);
             }
             public void setWidth(String val) {
-                this.widthExdr = new FlexibleStringExpander(val);
+                this.widthExdr = FlexibleStringExpander.getInstance(val);
             }
             public void setHeight(String val) {
-                this.heightExdr = new FlexibleStringExpander(val);
+                this.heightExdr = FlexibleStringExpander.getInstance(val);
             }
             public void setBorder(String val) {
-                this.borderExdr = new FlexibleStringExpander(val);
+                this.borderExdr = FlexibleStringExpander.getInstance(val);
             }
             public void setUrlMode(String val) {
                 if (UtilValidate.isEmpty(val)) {

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeAction.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeAction.java?rev=687422&r1=687421&r2=687422&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeAction.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeAction.java Wed Aug 20 11:50:04 2008
@@ -121,8 +121,8 @@
             super (modelNode, setElement);
             this.field = new FlexibleMapAccessor<Object>(setElement.getAttribute("field"));
             this.fromField = UtilValidate.isNotEmpty(setElement.getAttribute("from-field")) ? new FlexibleMapAccessor<Object>(setElement.getAttribute("from-field")) : null;
-            this.valueExdr = UtilValidate.isNotEmpty(setElement.getAttribute("value")) ? new FlexibleStringExpander(setElement.getAttribute("value")) : null;
-            this.globalExdr = new FlexibleStringExpander(setElement.getAttribute("global"));
+            this.valueExdr = UtilValidate.isNotEmpty(setElement.getAttribute("value")) ? FlexibleStringExpander.getInstance(setElement.getAttribute("value")) : null;
+            this.globalExdr = FlexibleStringExpander.getInstance(setElement.getAttribute("global"));
             this.type = setElement.getAttribute("type");
             if (this.fromField != null && this.valueExdr != null) {
                 throw new IllegalArgumentException("Cannot specify a from-field [" + setElement.getAttribute("from-field") + "] and a value [" + setElement.getAttribute("value") + "] on the set action in a tree widget");
@@ -230,13 +230,13 @@
         
         public void initService( Element serviceElement ) {
             
-            this.serviceNameExdr = new FlexibleStringExpander(serviceElement.getAttribute("service-name"));
+            this.serviceNameExdr = FlexibleStringExpander.getInstance(serviceElement.getAttribute("service-name"));
             this.resultMapNameAcsr = UtilValidate.isNotEmpty(serviceElement.getAttribute("result-map-name")) ? new FlexibleMapAccessor<Map<String, Object>>(serviceElement.getAttribute("result-map-name")) : null;
-            this.autoFieldMapExdr = new FlexibleStringExpander(serviceElement.getAttribute("auto-field-map"));
-            this.resultMapListNameExdr = new FlexibleStringExpander(serviceElement.getAttribute("result-map-list-name"));
-            this.resultMapListIteratorNameExdr = new FlexibleStringExpander(serviceElement.getAttribute("result-map-list-iterator-name"));
-            this.resultMapValueNameExdr = new FlexibleStringExpander(serviceElement.getAttribute("result-map-value-name"));
-            this.valueNameExdr = new FlexibleStringExpander(serviceElement.getAttribute("value-name"));
+            this.autoFieldMapExdr = FlexibleStringExpander.getInstance(serviceElement.getAttribute("auto-field-map"));
+            this.resultMapListNameExdr = FlexibleStringExpander.getInstance(serviceElement.getAttribute("result-map-list-name"));
+            this.resultMapListIteratorNameExdr = FlexibleStringExpander.getInstance(serviceElement.getAttribute("result-map-list-iterator-name"));
+            this.resultMapValueNameExdr = FlexibleStringExpander.getInstance(serviceElement.getAttribute("result-map-value-name"));
+            this.valueNameExdr = FlexibleStringExpander.getInstance(serviceElement.getAttribute("value-name"));
             this.fieldMap = EntityFinderUtil.makeFieldMap(serviceElement);
         }
         

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeCondition.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeCondition.java?rev=687422&r1=687421&r2=687422&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeCondition.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeCondition.java Wed Aug 20 11:50:04 2008
@@ -200,8 +200,8 @@
         
         public IfHasPermission(ModelTree modelTree, Element condElement) {
             super (modelTree, condElement);
-            this.permissionExdr = new FlexibleStringExpander(condElement.getAttribute("permission"));
-            this.actionExdr = new FlexibleStringExpander(condElement.getAttribute("action"));
+            this.permissionExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("permission"));
+            this.actionExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("action"));
         }
         
         public boolean eval(Map<String, Object> context) {
@@ -236,8 +236,8 @@
         public IfValidateMethod(ModelTree modelTree, Element condElement) {
             super (modelTree, condElement);
             this.fieldAcsr = new FlexibleMapAccessor<Object>(condElement.getAttribute("field-name"));
-            this.methodExdr = new FlexibleStringExpander(condElement.getAttribute("method"));
-            this.classExdr = new FlexibleStringExpander(condElement.getAttribute("class"));
+            this.methodExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("method"));
+            this.classExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("class"));
         }
         
         public boolean eval(Map<String, Object> context) {
@@ -298,12 +298,12 @@
         public IfCompare(ModelTree modelTree, Element condElement) {
             super (modelTree, condElement);
             this.fieldAcsr = new FlexibleMapAccessor<Object>(condElement.getAttribute("field-name"));
-            this.valueExdr = new FlexibleStringExpander(condElement.getAttribute("value"));
+            this.valueExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("value"));
             
             this.operator = condElement.getAttribute("operator");
             this.type = condElement.getAttribute("type");
 
-            this.formatExdr = new FlexibleStringExpander(condElement.getAttribute("format"));
+            this.formatExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("format"));
         }
         
         public boolean eval(Map<String, Object> context) {
@@ -352,7 +352,7 @@
             this.operator = condElement.getAttribute("operator");
             this.type = condElement.getAttribute("type");
 
-            this.formatExdr = new FlexibleStringExpander(condElement.getAttribute("format"));
+            this.formatExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("format"));
         }
         
         public boolean eval(Map<String, Object> context) {
@@ -395,7 +395,7 @@
         public IfRegexp(ModelTree modelTree, Element condElement) {
             super (modelTree, condElement);
             this.fieldAcsr = new FlexibleMapAccessor<Object>(condElement.getAttribute("field-name"));
-            this.exprExdr = new FlexibleStringExpander(condElement.getAttribute("expr"));
+            this.exprExdr = FlexibleStringExpander.getInstance(condElement.getAttribute("expr"));
         }
         
         public boolean eval(Map<String, Object> context) {