Author: lektran
Date: Mon Nov 23 03:34:30 2009
New Revision: 883235
URL:
http://svn.apache.org/viewvc?rev=883235&view=revLog:
Allow a WidgetWorker.Parameter instance to be created without an Element
Modified:
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java
Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java?rev=883235&r1=883234&r2=883235&view=diff==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java Mon Nov 23 03:34:30 2009
@@ -296,6 +296,15 @@
this.fromField = UtilValidate.isNotEmpty(element.getAttribute("from-field")) ? FlexibleMapAccessor.getInstance(element.getAttribute("from-field")) : null;
}
+ public Parameter(String paramName, String paramValue, boolean isField) {
+ this.name = paramName;
+ if (isField) {
+ this.fromField = FlexibleMapAccessor.getInstance(paramValue);
+ } else {
+ this.value = FlexibleStringExpander.getInstance(paramValue);
+ }
+ }
+
public String getName() {
return name;
}