sventon subversion web client - http://www.sventon.org
[show recent changes]
 
  Help
HEAD
Rev: 48306 - http://anonsvn.icesoft.org/repo / icefaces4 / trunk / icefaces / core / src / main / java / org / icefaces / impl / event / ResourceOrdering.java
Unified Diff View - ResourceOrdering.java
/icefaces4/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/ResourceOrdering.java @ revision 48305
/icefaces4/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/ResourceOrdering.java @ revision 48306
@@ -241,6 +241,7 @@         ArrayList<UIComponent> orderedCSSChildren = new ArrayList();         ArrayList<UIComponent> orderedUnknownTypeChildren = new ArrayList(); +        ArrayList<String> duplicateCheckList = new ArrayList<String>();         for (ResourceEntry resourceEntry : masterDependencyList) {             List children = resourceContainer.getChildren();             for (UIComponent next : new ArrayList<UIComponent>(children)) { @@ -250,12 +251,16 @@                 if (resourceEntry.name.equals(name) && resourceEntry.library.equals(library)) {                     root.removeComponentResource(context, next, target); -                    if (name.endsWith(JS)) { -                        orderedJSChildren.add(next); -                    } else if (name.endsWith(CSS)) { -                        orderedCSSChildren.add(next); -                    } else { -                        orderedUnknownTypeChildren.add(next); +                    final String nameAndLibrary = name + "::" + library; +                    if (!duplicateCheckList.contains(nameAndLibrary)) { +                        if (name.endsWith(JS)) { +                            orderedJSChildren.add(next); +                        } else if (name.endsWith(CSS)) { +                            orderedCSSChildren.add(next); +                        } else { +                            orderedUnknownTypeChildren.add(next); +                        } +                        duplicateCheckList.add(nameAndLibrary);                     }                 }             }


feed icon

sventon 2.5.1