(no commit message)
authorErik Brakkee <erik@brakkee.org>
Sat, 28 Aug 2010 19:40:42 +0000 (19:40 +0000)
committerErik Brakkee <erik@brakkee.org>
Sat, 28 Aug 2010 19:40:42 +0000 (19:40 +0000)
wicket/components/src/main/java/org/wamblee/wicket/jquery/AbstractJQueryBehavior.java
wicket/components/src/main/java/org/wamblee/wicket/jquery/JQueryHeaderContributor.java
wicket/components/src/main/java/org/wamblee/wicket/jquery/package-info.java [new file with mode: 0644]

index 14692bfb8bbd03aed1eaf94a499b6caeaced6667..b1d271346ffe605579333ed8cf7f72bd84cceecc 100644 (file)
@@ -24,11 +24,11 @@ import org.apache.wicket.markup.html.IHeaderResponse;
 import org.wamblee.wicket.behavior.CompositeBehavior;
 
 /**
- * Abstract JQuery hehavior class that performs some useful basic behaviors for
- * the behavior such as:
+ * Abstract JQuery hehavior class that makes it easy to write jQuery behaviors:
  * <ul>
  * <li>Creating a ready function which will be invoked for the component</li>
  * <li>Checking that the component is not a page</li>
+ * <li>Ensuring tha the markup id of the component is output</li>
  * <li>Creating a call to an intialization function from the ready handler using the component id </li>
  * </ul>
  * 
@@ -44,7 +44,8 @@ public class AbstractJQueryBehavior extends CompositeBehavior {
      * Constructs the behavior.
      * 
      * @param aFunction
-     *            Ready function to be invoked.
+     *            Function to be invoked from the ready handler. This function is invoked with a 
+     *            CSS selector that identifies the component.
      * @param aBehaviors
      *            Behaviors to add in addition to the basic JQuery stuff.
      */
index fb4cdf489d0d5c6c9d54bb242cb253bcf38d1d20..63f2f68a30a946089c591d181ec39c46283238da 100644 (file)
@@ -22,7 +22,10 @@ import org.apache.wicket.markup.html.IHeaderResponse;
 import org.apache.wicket.markup.html.JavascriptPackageResource;
 
 /**
- * JQuery bahavior which adds the jquery javascript.
+ * JQuery header contribution that adds the jquery javascript and sets jQuery to 
+ * no-conflict mode so the <code>$</code> identifier is freed. Also, it checks
+ * the current configuration and uses the development mode jQuery library when run in 
+ * developmemnt mode and used the minimalized jQuery code when running in deployment mode.
  * 
  * @author Erik Brakkee
  */
diff --git a/wicket/components/src/main/java/org/wamblee/wicket/jquery/package-info.java b/wicket/components/src/main/java/org/wamblee/wicket/jquery/package-info.java
new file mode 100644 (file)
index 0000000..cf55a8f
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2005-2010 the original author or authors.
+ * 
+ * Licensed 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.
+ */
+/**
+ * This package contains general support utilities for writing behaviors based on jQuery.
+ */
+package org.wamblee.wicket.jquery;
+