Render only the most specific resource reference. All other will be rendered as 
dependencies of it.


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/0f3d2323
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/0f3d2323
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/0f3d2323

Branch: refs/heads/master
Commit: 0f3d2323b58f64776c6e09e51cda27bcea525139
Parents: 7f80137
Author: Martin Tzvetanov Grigorov <[email protected]>
Authored: Wed May 16 09:08:03 2012 +0200
Committer: Martin Tzvetanov Grigorov <[email protected]>
Committed: Wed May 16 09:09:15 2012 +0200

----------------------------------------------------------------------
 .../wicket/resource/CoreLibrariesContributor.java  |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/0f3d2323/wicket-core/src/main/java/org/apache/wicket/resource/CoreLibrariesContributor.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/resource/CoreLibrariesContributor.java
 
b/wicket-core/src/main/java/org/apache/wicket/resource/CoreLibrariesContributor.java
index 517a93e..faf16b5 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/resource/CoreLibrariesContributor.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/resource/CoreLibrariesContributor.java
@@ -31,7 +31,6 @@ import org.apache.wicket.settings.IJavaScriptLibrarySettings;
  */
 public class CoreLibrariesContributor
 {
-
        /**
         * Contributes the backing library plus the implementation of 
Wicket.Event.
         * 
@@ -58,11 +57,7 @@ public class CoreLibrariesContributor
         */
        public static void contributeAjax(final Application application, final 
IHeaderResponse response)
        {
-               CoreLibrariesContributor.contribute(application, response);
-
                IJavaScriptLibrarySettings jsLibrarySettings = 
application.getJavaScriptLibrarySettings();
-               ResourceReference wicketAjaxReference = 
jsLibrarySettings.getWicketAjaxReference();
-               
response.render(JavaScriptHeaderItem.forReference(wicketAjaxReference));
 
                final IDebugSettings debugSettings = 
application.getDebugSettings();
                if (debugSettings.isAjaxDebugModeEnabled())
@@ -71,5 +66,10 @@ public class CoreLibrariesContributor
                        
response.render(JavaScriptHeaderItem.forScript("Wicket.Ajax.DebugWindow.enabled=true;",
                                "wicket-ajax-debug-enable"));
                }
+               else
+               {
+                       ResourceReference wicketAjaxReference = 
jsLibrarySettings.getWicketAjaxReference();
+                       
response.render(JavaScriptHeaderItem.forReference(wicketAjaxReference));
+               }
        }
 }

Reply via email to