Author: knopp
Date: Thu Nov  1 02:38:47 2007
New Revision: 590946

URL: http://svn.apache.org/viewvc?rev=590946&view=rev
Log:
WICKET-1005

Added:
    
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/WicketAjaxReference.java
   (with props)
Modified:
    
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java?rev=590946&r1=590945&r2=590946&view=diff
==============================================================================
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
 Thu Nov  1 02:38:47 2007
@@ -44,15 +44,11 @@
 
        /** reference to the default indicator gif file. */
        public static final ResourceReference INDICATOR = new ResourceReference(
-                       AbstractDefaultAjaxBehavior.class, "indicator.gif");
-
-       /** reference to the default ajax support javascript file. */
-       private static final ResourceReference JAVASCRIPT = new 
JavascriptResourceReference(
-                       AbstractDefaultAjaxBehavior.class, "wicket-ajax.js");
+               AbstractDefaultAjaxBehavior.class, "indicator.gif");
 
        /** reference to the default ajax debug support javascript file. */
        private static final ResourceReference JAVASCRIPT_DEBUG = new 
JavascriptResourceReference(
-                       AbstractDefaultAjaxBehavior.class, 
"wicket-ajax-debug.js");
+               AbstractDefaultAjaxBehavior.class, "wicket-ajax-debug.js");
 
        /**
         * Subclasses should call super.onBind()
@@ -74,7 +70,7 @@
                final IDebugSettings debugSettings = 
Application.get().getDebugSettings();
 
                
response.renderJavascriptReference(WicketEventReference.INSTANCE);
-               response.renderJavascriptReference(JAVASCRIPT);
+               
response.renderJavascriptReference(WicketAjaxReference.INSTANCE);
 
                if (debugSettings.isAjaxDebugModeEnabled())
                {
@@ -116,7 +112,7 @@
        protected CharSequence getCallbackScript(boolean onlyTargetActivePage)
        {
                return generateCallbackScript("wicketAjaxGet('" + 
getCallbackUrl(onlyTargetActivePage) +
-                               "'");
+                       "'");
        }
 
        /**
@@ -235,7 +231,7 @@
                if (!Strings.isEmpty(indicatorId))
                {
                        call = new 
AppendingStringBuffer("wicketShow('").append(indicatorId).append("');")
-                                       .append(call);
+                               .append(call);
                }
 
                if (decorator != null)
@@ -319,7 +315,7 @@
         * @return wrapped javascript
         */
        public static final CharSequence throttleScript(CharSequence script, 
String throttleId,
-                       Duration throttleDelay)
+               Duration throttleDelay)
        {
                if (Strings.isEmpty(script))
                {
@@ -337,7 +333,7 @@
                }
 
                return new AppendingStringBuffer("wicketThrottler.throttle( 
'").append(throttleId).append(
-                               "', 
").append(throttleDelay.getMilliseconds()).append(", function() { ").append(
-                               script).append("});");
+                       "', 
").append(throttleDelay.getMilliseconds()).append(", function() { 
").append(script)
+                       .append("});");
        }
 }

Added: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/WicketAjaxReference.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/WicketAjaxReference.java?rev=590946&view=auto
==============================================================================
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/WicketAjaxReference.java
 (added)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/WicketAjaxReference.java
 Thu Nov  1 02:38:47 2007
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.ajax;
+
+import org.apache.wicket.ResourceReference;
+import org.apache.wicket.markup.html.resources.JavascriptResourceReference;
+
+/**
+ * Resource reference for Wicket AJAX javascript implementation
+ * 
+ * @author Matej Knopp
+ */
+public class WicketAjaxReference extends JavascriptResourceReference
+{
+       private static final long serialVersionUID = 1L;
+
+       /**
+        * Singleton instance of this reference
+        */
+       public static final ResourceReference INSTANCE = new 
WicketAjaxReference();
+
+       private WicketAjaxReference()
+       {
+               super(WicketAjaxReference.class, "wicket-ajax.js");
+       }
+}

Propchange: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/WicketAjaxReference.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain


Reply via email to