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/06/10 12:38:05 UTC
git commit: WICKET-5223 AjaxEditableLabel doesn't provide a way to
configure Ajax attributes for its Ajax behaviors
Updated Branches:
refs/heads/wicket-6.x 047997400 -> 20a7f80d6
WICKET-5223 AjaxEditableLabel doesn't provide a way to configure Ajax attributes for its Ajax behaviors
Add #updateEditorAjaxAttributes() and #updateLabelAjaxAttributes() to AjaxEditableLabel
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/20a7f80d
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/20a7f80d
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/20a7f80d
Branch: refs/heads/wicket-6.x
Commit: 20a7f80d6f8b9ba025edd30169e46ed505612164
Parents: 0479974
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Mon Jun 10 13:34:44 2013 +0300
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Mon Jun 10 13:34:44 2013 +0300
----------------------------------------------------------------------
.../ajax/markup/html/AjaxEditableLabel.java | 38 ++++++++++++++++++++
1 file changed, 38 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/20a7f80d/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableLabel.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableLabel.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableLabel.java
index ac389d6..661ae76 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableLabel.java
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableLabel.java
@@ -88,6 +88,14 @@ public class AjaxEditableLabel<T> extends Panel
private static final long serialVersionUID = 1L;
@Override
+ protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
+ {
+ super.updateAjaxAttributes(attributes);
+
+ AjaxEditableLabel.this.updateEditorAjaxAttributes(attributes);
+ }
+
+ @Override
public void renderHead(final Component component, final IHeaderResponse response)
{
super.renderHead(component, response);
@@ -148,6 +156,36 @@ public class AjaxEditableLabel<T> extends Panel
{
onEdit(target);
}
+
+ @Override
+ protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
+ {
+ super.updateAjaxAttributes(attributes);
+
+ AjaxEditableLabel.this.updateLabelAjaxAttributes(attributes);
+ }
+ }
+
+ /**
+ * Gives a chance to the specializations to modify the Ajax attributes for
+ * the request when this component switches from an editor to a label.
+ *
+ * @param attributes
+ * The Ajax attributes to modify
+ */
+ protected void updateLabelAjaxAttributes(AjaxRequestAttributes attributes)
+ {
+ }
+
+ /**
+ * Gives a chance to the specializations to modify the Ajax attributes for
+ * the request when this component switches from a label to an editor.
+ *
+ * @param attributes
+ * The Ajax attributes to modify
+ */
+ protected void updateEditorAjaxAttributes(AjaxRequestAttributes attributes)
+ {
}
/**