svn commit: r667508 - /ofbiz/trunk/framework/example/webapp/example/WEB-INF/actions/includes/FindExampleFeatures.groovy

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

svn commit: r667508 - /ofbiz/trunk/framework/example/webapp/example/WEB-INF/actions/includes/FindExampleFeatures.groovy

jleroux@apache.org
Author: jleroux
Date: Fri Jun 13 05:42:32 2008
New Revision: 667508

URL: http://svn.apache.org/viewvc?rev=667508&view=rev
Log:
Better bsh-groovy migration, thanks to Scott and Ashish for review

Modified:
    ofbiz/trunk/framework/example/webapp/example/WEB-INF/actions/includes/FindExampleFeatures.groovy

Modified: ofbiz/trunk/framework/example/webapp/example/WEB-INF/actions/includes/FindExampleFeatures.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/webapp/example/WEB-INF/actions/includes/FindExampleFeatures.groovy?rev=667508&r1=667507&r2=667508&view=diff
==============================================================================
--- ofbiz/trunk/framework/example/webapp/example/WEB-INF/actions/includes/FindExampleFeatures.groovy (original)
+++ ofbiz/trunk/framework/example/webapp/example/WEB-INF/actions/includes/FindExampleFeatures.groovy Fri Jun 13 05:42:32 2008
@@ -27,7 +27,7 @@
 
 
 andExprs = [];
-fieldValue = parameters.exampleFeatureId;
+fieldValue = request.getParameter("exampleFeatureId");
 if (fieldValue) {
     andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER(EntityFieldValue.makeFieldValue("exampleFeatureId")),
             EntityOperator.LIKE, "%" + fieldValue.toUpperCase() + "%"));
@@ -36,8 +36,7 @@
 autocompleteOptions = [];
 if (andExprs) {
     entityConditionList = EntityCondition.makeCondition(andExprs, EntityOperator.AND);
-    autocompleteOptions = delegator.findList("ExampleFeature", entityConditionList,
-            new TreeSet(['exampleFeatureId', 'description'], ['-exampleFeatureId'], null, false);
+    autocompleteOptions = delegator.findList("ExampleFeature", entityConditionList, ['exampleFeatureId', 'description'] as Set, ['-exampleFeatureId'], null, false);
     //context.autocompleteOptions = autocompleteOptions;
  request.setAttribute("autocompleteOptions", autocompleteOptions);
 }