You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2013/05/29 22:24:00 UTC
[1/2] git commit: Java 7. Fix Minor typo
Updated Branches:
refs/heads/master 6dbcc951f -> 936ad6a5c
Java 7. Fix Minor typo
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/81958e59
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/81958e59
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/81958e59
Branch: refs/heads/master
Commit: 81958e59bbe58ddc471658c6009520e54cbbd184
Parents: 6dbcc95
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Wed May 29 23:04:32 2013 +0300
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Wed May 29 23:04:32 2013 +0300
----------------------------------------------------------------------
.../org/apache/wicket/util/tester/TagTester.java | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/81958e59/wicket-core/src/main/java/org/apache/wicket/util/tester/TagTester.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/util/tester/TagTester.java b/wicket-core/src/main/java/org/apache/wicket/util/tester/TagTester.java
index 9915981..daae7eb 100644
--- a/wicket-core/src/main/java/org/apache/wicket/util/tester/TagTester.java
+++ b/wicket-core/src/main/java/org/apache/wicket/util/tester/TagTester.java
@@ -345,7 +345,7 @@ public class TagTester
/**
* Static factory method for creating a <code>TagTester</code> based on a tag found by an
* attribute with a specific value. Please note that it will return the first tag which matches
- * the criteria. It's therefore good for attributes suck as "id" or "wicket:id", but only if
+ * the criteria. It's therefore good for attributes such as "id" or "wicket:id", but only if
* "wicket:id" is unique in the specified markup.
*
* @param markup
@@ -488,7 +488,7 @@ public class TagTester
public static List<TagTester> createTagsByAttribute(String markup, String attribute,
String value, boolean stopAfterFirst)
{
- List<TagTester> testers = new ArrayList<TagTester>();
+ List<TagTester> testers = new ArrayList<>();
if ((Strings.isEmpty(markup) == false) && (Strings.isEmpty(attribute) == false) &&
(Strings.isEmpty(value) == false))
[2/2] git commit: WICKET-5212 Move
AjaxRequestTarget.AbstractListener#updateAjaxAttributes to
AjaxRequestTarget.IListener
Posted by mg...@apache.org.
WICKET-5212 Move AjaxRequestTarget.AbstractListener#updateAjaxAttributes to AjaxRequestTarget.IListener
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/936ad6a5
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/936ad6a5
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/936ad6a5
Branch: refs/heads/master
Commit: 936ad6a5c4b4a274762543901b0025f57defb7c4
Parents: 81958e5
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Wed May 29 23:23:24 2013 +0300
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Wed May 29 23:23:24 2013 +0300
----------------------------------------------------------------------
.../wicket/ajax/AbstractDefaultAjaxBehavior.java | 5 +----
.../org/apache/wicket/ajax/AjaxRequestTarget.java | 11 ++++++++++-
.../protocol/http/AjaxEnclosureListener.java | 7 +------
.../apache/wicket/ajax/AjaxRequestHandlerTest.java | 2 +-
4 files changed, 13 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/936ad6a5/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java b/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
index 18f91ae..fefb23b 100644
--- a/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
+++ b/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
@@ -139,10 +139,7 @@ public abstract class AbstractDefaultAjaxBehavior extends AbstractAjaxBehavior
.getAjaxRequestTargetListeners();
for (AjaxRequestTarget.IListener listener : ajaxRequestTargetListeners)
{
- if (listener instanceof AjaxRequestTarget.AbstractListener)
- {
- ((AjaxRequestTarget.AbstractListener)listener).updateAjaxAttributes(attributes);
- }
+ listener.updateAjaxAttributes(attributes);
}
updateAjaxAttributes(attributes);
return attributes;
http://git-wip-us.apache.org/repos/asf/wicket/blob/936ad6a5/wicket-core/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java b/wicket-core/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
index 637bb01..662fe1f 100644
--- a/wicket-core/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
+++ b/wicket-core/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
@@ -66,6 +66,15 @@ public interface AjaxRequestTarget extends IPageRequestHandler, ILoggableRequest
* response object that can be used to output javascript
*/
void onAfterRespond(Map<String, Component> map, AjaxRequestTarget.IJavaScriptResponse response);
+
+ /**
+ * Triggered for every Ajax behavior.
+ * Can be used to configure common settings.
+ *
+ * @param attributes
+ * The attributes for the Ajax behavior
+ */
+ void updateAjaxAttributes(AjaxRequestAttributes attributes);
}
/**
@@ -74,7 +83,7 @@ public interface AjaxRequestTarget extends IPageRequestHandler, ILoggableRequest
*/
class AbstractListener implements IListener
{
- // TODO Wicket 7.0 Move in IListener
+ @Override
public void updateAjaxAttributes(AjaxRequestAttributes attributes)
{
}
http://git-wip-us.apache.org/repos/asf/wicket/blob/936ad6a5/wicket-core/src/main/java/org/apache/wicket/protocol/http/AjaxEnclosureListener.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/protocol/http/AjaxEnclosureListener.java b/wicket-core/src/main/java/org/apache/wicket/protocol/http/AjaxEnclosureListener.java
index bf6161c..1c583a7 100644
--- a/wicket-core/src/main/java/org/apache/wicket/protocol/http/AjaxEnclosureListener.java
+++ b/wicket-core/src/main/java/org/apache/wicket/protocol/http/AjaxEnclosureListener.java
@@ -55,7 +55,7 @@ import org.apache.wicket.util.visit.IVisitor;
*
* @author Joonas Hamalainen
*/
-public class AjaxEnclosureListener implements AjaxRequestTarget.IListener
+public class AjaxEnclosureListener extends AjaxRequestTarget.AbstractListener
{
/**
* Construct.
@@ -107,9 +107,4 @@ public class AjaxEnclosureListener implements AjaxRequestTarget.IListener
{
return enclosure.getParent().get(enclosure.getChildId()) == component;
}
-
- @Override
- public void onAfterRespond(final Map<String, Component> map, final AjaxRequestTarget.IJavaScriptResponse response)
- {
- }
}
http://git-wip-us.apache.org/repos/asf/wicket/blob/936ad6a5/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxRequestHandlerTest.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxRequestHandlerTest.java b/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxRequestHandlerTest.java
index 4627f94..2016766 100644
--- a/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxRequestHandlerTest.java
+++ b/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxRequestHandlerTest.java
@@ -302,7 +302,7 @@ public class AjaxRequestHandlerTest extends WicketTestCase
}
}
- private static class ValidatingAjaxRequestTargetListener implements AjaxRequestTarget.IListener
+ private static class ValidatingAjaxRequestTargetListener extends AjaxRequestTarget.AbstractListener
{
boolean onBeforeRespondExecuted = false;
boolean onAfterRespondExecuted = false;