Author: jleroux
Date: Thu Aug 21 00:43:51 2008
New Revision: 687614
URL:
http://svn.apache.org/viewvc?rev=687614&view=revLog:
A patch from Luke Prentice "Sort related entities in ViewGeneric" (
https://issues.apache.org/jira/browse/OFBIZ-1921) - OFBIZ-1921
Modified:
ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/ViewGeneric.groovy
Modified: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/ViewGeneric.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/ViewGeneric.groovy?rev=687614&r1=687613&r2=687614&view=diff==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/ViewGeneric.groovy (original)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/ViewGeneric.groovy Thu Aug 21 00:43:51 2008
@@ -308,6 +308,7 @@
mapRelation.put("type", relation.getType());
mapRelation.put("title", relation.getTitle());
mapRelation.put("relEntityName", relation.getRelEntityName());
+ mapRelation.put("sortName", relation.getTitle() + relation.getRelEntityName());
mapRelation.put("relatedTable", relatedEntity.getEntityName());
mapRelation.put("relCreate", relCreate);
@@ -422,5 +423,5 @@
}
}
}
-context.put("relationFieldList", relationFieldList);
+context.put("relationFieldList", UtilMisc.sortMaps(relationFieldList, UtilMisc.toList("sortName")));
context.put("relSize", relationFieldList.size() + 2);