Author: ashish
Date: Wed Apr 21 13:29:08 2010
New Revision: 936296
URL:
http://svn.apache.org/viewvc?rev=936296&view=revLog:
Applied patch from jira issue OFBIZ-3735 - Added defaultSequenceNum field for sort order in makeCategoryFeatureLists method for ParametricSearch.
Description of the work:
Added defaultSequenceNum field for sort order in makeCategoryFeatureLists method for ParametricSearch.java.
If user want to display product feature in specific order for advanced search so this could be done through defaultSequenceNum. Currently product feature sort only basis of description in makeCategoryFeatureLists method.So if user set defaultSequenceNum field for ProductFeature, then productFeature can not sequence according to defaultSequenceNum for advanced search.
After adding defaultSequenceNum field in sort order, ProductFeature now also sort with respect to defaultSequenceNum.
Thanks Deepak & Rishi for the contribution.
Modified:
ofbiz/trunk/applications/product/src/org/ofbiz/product/feature/ParametricSearch.java
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/feature/ParametricSearch.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/feature/ParametricSearch.java?rev=936296&r1=936295&r2=936296&view=diff==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/feature/ParametricSearch.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/feature/ParametricSearch.java Wed Apr 21 13:29:08 2010
@@ -113,7 +113,7 @@ public class ParametricSearch {
// now before returning, order the features in each list by description
Map<String, List<GenericValue>> productFeaturesByTypeMapSorted = FastMap.newInstance();
for (Map.Entry<String, Map<String, GenericValue>> entry: productFeaturesByTypeMap.entrySet()) {
- List<GenericValue> sortedFeatures = EntityUtil.orderBy(entry.getValue().values(), UtilMisc.toList("description"));
+ List<GenericValue> sortedFeatures = EntityUtil.orderBy(entry.getValue().values(), UtilMisc.toList("description","defaultSequenceNum"));
productFeaturesByTypeMapSorted.put(entry.getKey(), sortedFeatures);
}