Hi there,

I think it would be beneficial to be able to iterate over the components of a page in a well defined order (e.g., the order in which they occur in the template). Therefore, I would like to suggest to change the Map-Implementation of _components (and _assets) in AbstractComponent from java.util.HashMap to java.util.LinkedHashMap (see the patch to 4.1.3-final below).

What do you think about such a change?

Best regards,
Michael Häusler



Index: C:/Dokumente und Einstellungen/michael.haeusler/workspace/tapestry/tapestry-framework/src/java/org/apache/tapestry/AbstractComponent.java
===================================================================
--- C:/Dokumente und Einstellungen/michael.haeusler/workspace/tapestry/tapestry-framework/src/java/org/apache/tapestry/AbstractComponent.java (revision 614876) +++ C:/Dokumente und Einstellungen/michael.haeusler/workspace/tapestry/tapestry-framework/src/java/org/apache/tapestry/AbstractComponent.java (working copy)
@@ -155,7 +155,7 @@
         checkActiveLock();

         if (_assets == null)
-            _assets = new HashMap(MAP_SIZE);
+            _assets = new LinkedHashMap(MAP_SIZE);

         _assets.put(name, asset);
     }
@@ -167,7 +167,7 @@
         checkActiveLock();

         if (_components == null)
-            _components = new HashMap(MAP_SIZE);
+            _components = new LinkedHashMap(MAP_SIZE);

         _components.put(component.getId(), component);
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to