You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by sv...@apache.org on 2012/07/27 18:56:53 UTC
git commit: WICKET-4641 AjaxFallbackLink is allowed on if it
is disabled
Updated Branches:
refs/heads/wicket-1.5.x 9d4fa80eb -> c2d647b17
WICKET-4641 AjaxFallbackLink is allowed on <span> if it is disabled
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/c2d647b1
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/c2d647b1
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/c2d647b1
Branch: refs/heads/wicket-1.5.x
Commit: c2d647b17759ccadf4663c63f729b80847783d6f
Parents: 9d4fa80
Author: svenmeier <sv...@apache.org>
Authored: Fri Jul 27 18:41:31 2012 +0200
Committer: svenmeier <sv...@apache.org>
Committed: Fri Jul 27 18:41:31 2012 +0200
----------------------------------------------------------------------
.../wicket/ajax/markup/html/AjaxFallbackLink.java | 23 ++++++++-------
1 files changed, 12 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/c2d647b1/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/AjaxFallbackLink.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/AjaxFallbackLink.java b/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/AjaxFallbackLink.java
index e2f4cd7..39e5cd7 100644
--- a/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/AjaxFallbackLink.java
+++ b/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/AjaxFallbackLink.java
@@ -31,13 +31,13 @@ import org.slf4j.LoggerFactory;
/**
* An ajax link that will degrade to a normal request if ajax is not available or javascript is
* disabled
- *
- * <p>
+ *
+ * <p>
* If JavaScript is enabled then the registered JavaScript event 'click' handler will be used,
- * otherwise the 'href' attribute if the markup element is an <a>, <area> or <link>.
- * AjaxFallbackLink doesn't fallback if the markup element is none of the three above.
+ * otherwise the 'href' attribute if the markup element is an <a>, <area> or
+ * <link>. AjaxFallbackLink doesn't fallback if the markup element is none of the three above.
* </p>
- *
+ *
* @since 1.2
*
* @author Igor Vaynberg (ivaynberg)
@@ -177,14 +177,15 @@ public abstract class AjaxFallbackLink<T> extends Link<T> implements IAjaxLink
super.onComponentTag(tag);
String tagName = tag.getName();
- if (
+ if (isLinkEnabled() &&
LOG.isWarnEnabled() &&
- !("a".equalsIgnoreCase(tagName) || "area".equalsIgnoreCase(tagName) || "link".equalsIgnoreCase(tagName))
- )
+ !("a".equalsIgnoreCase(tagName) || "area".equalsIgnoreCase(tagName) || "link".equalsIgnoreCase(tagName)))
{
- LOG.warn("{} must be used only with <a>, <area> or <link> markup elements. The fallback functionality doesn't" +
- " work for other markup elements. Component path: {}, markup element: <{}>.",
- new Object[] {AjaxFallbackLink.class.getSimpleName(), getClassRelativePath(), tagName});
+ LOG.warn(
+ "{} must be used only with <a>, <area> or <link> markup elements. The fallback functionality doesn't"
+ + " work for other markup elements. Component path: {}, markup element: <{}>.",
+ new Object[] { AjaxFallbackLink.class.getSimpleName(), getClassRelativePath(),
+ tagName });
}
}
}