svn commit: r687614 - /ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/ViewGeneric.groovy

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

svn commit: r687614 - /ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/ViewGeneric.groovy

jleroux@apache.org
Author: jleroux
Date: Thu Aug 21 00:43:51 2008
New Revision: 687614

URL: http://svn.apache.org/viewvc?rev=687614&view=rev
Log:
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);