From e1e84f0c0a30493e856bd2d54807cff237a6a112 Mon Sep 17 00:00:00 2001 From: Erik Brakkee Date: Sat, 28 Aug 2010 19:40:42 +0000 Subject: [PATCH] --- .../wicket/jquery/AbstractJQueryBehavior.java | 7 ++++--- .../jquery/JQueryHeaderContributor.java | 5 ++++- .../wamblee/wicket/jquery/package-info.java | 20 +++++++++++++++++++ 3 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 wicket/components/src/main/java/org/wamblee/wicket/jquery/package-info.java diff --git a/wicket/components/src/main/java/org/wamblee/wicket/jquery/AbstractJQueryBehavior.java b/wicket/components/src/main/java/org/wamblee/wicket/jquery/AbstractJQueryBehavior.java index 14692bfb..b1d27134 100644 --- a/wicket/components/src/main/java/org/wamblee/wicket/jquery/AbstractJQueryBehavior.java +++ b/wicket/components/src/main/java/org/wamblee/wicket/jquery/AbstractJQueryBehavior.java @@ -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: * * @@ -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. */ diff --git a/wicket/components/src/main/java/org/wamblee/wicket/jquery/JQueryHeaderContributor.java b/wicket/components/src/main/java/org/wamblee/wicket/jquery/JQueryHeaderContributor.java index fb4cdf48..63f2f68a 100644 --- a/wicket/components/src/main/java/org/wamblee/wicket/jquery/JQueryHeaderContributor.java +++ b/wicket/components/src/main/java/org/wamblee/wicket/jquery/JQueryHeaderContributor.java @@ -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 $ 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 index 00000000..cf55a8f6 --- /dev/null +++ b/wicket/components/src/main/java/org/wamblee/wicket/jquery/package-info.java @@ -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; + -- 2.31.1