wicket-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mgrigo...@apache.org
Subject wicket git commit: Make IGenericComponent's setter methods returning 'this' for method chaining
Date Sat, 06 Feb 2016 14:49:05 GMT
Repository: wicket
Updated Branches:
  refs/heads/master 13a763eda -> ac5e660c7


Make IGenericComponent's setter methods returning 'this' for method chaining

Closes #134


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/ac5e660c
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/ac5e660c
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/ac5e660c

Branch: refs/heads/master
Commit: ac5e660c75aa3a12b4b3768651675c58b409129b
Parents: 13a763e
Author: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
Authored: Sat Feb 6 15:48:08 2016 +0100
Committer: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
Committed: Sat Feb 6 15:48:08 2016 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/wicket/IGenericComponent.java    |  6 +++---
 .../java/org/apache/wicket/ajax/markup/html/AjaxLink.java |  6 ++++--
 .../org/apache/wicket/markup/html/GenericWebPage.java     |  6 ++++--
 .../org/apache/wicket/markup/html/basic/EnumLabel.java    | 10 ++++++----
 .../wicket/markup/html/form/AbstractTextComponent.java    |  2 +-
 .../java/org/apache/wicket/markup/html/form/Check.java    |  7 ++++---
 .../java/org/apache/wicket/markup/html/form/Form.java     |  8 +++++---
 .../org/apache/wicket/markup/html/form/FormComponent.java |  6 ++++--
 .../java/org/apache/wicket/markup/html/form/Radio.java    |  6 ++++--
 .../java/org/apache/wicket/markup/html/link/Link.java     |  6 ++++--
 .../java/org/apache/wicket/markup/html/list/ListItem.java |  6 ++++--
 .../html/navigation/paging/PagingNavigationLink.java      |  4 ++--
 .../org/apache/wicket/markup/html/panel/GenericPanel.java |  6 ++++--
 .../wicket/datetime/markup/html/basic/DateLabel.java      |  6 ++++--
 .../extensions/ajax/markup/html/AjaxEditableLabel.java    |  6 ++++--
 .../extensions/markup/html/form/select/SelectOption.java  |  6 ++++--
 .../markup/html/repeater/tree/AbstractTree.java           |  6 ++++--
 17 files changed, 65 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/ac5e660c/wicket-core/src/main/java/org/apache/wicket/IGenericComponent.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/IGenericComponent.java b/wicket-core/src/main/java/org/apache/wicket/IGenericComponent.java
index 5972824..3895c02 100644
--- a/wicket-core/src/main/java/org/apache/wicket/IGenericComponent.java
+++ b/wicket-core/src/main/java/org/apache/wicket/IGenericComponent.java
@@ -40,7 +40,7 @@ public interface IGenericComponent<T>
 	 * @param model
 	 *            the new model
 	 */
-	void setModel(IModel<T> model);
+	Component setModel(IModel<T> model);
 
 	/**
 	 * Typesafe setter for the model object
@@ -48,7 +48,7 @@ public interface IGenericComponent<T>
 	 * @param object
 	 *            the new model object
 	 */
-	void setModelObject(T object);
+	Component setModelObject(T object);
 
 	/**
 	 * Typesafe getter for the model's object
@@ -56,4 +56,4 @@ public interface IGenericComponent<T>
 	 * @return the model object
 	 */
 	T getModelObject();
-} 
\ No newline at end of file
+} 

http://git-wip-us.apache.org/repos/asf/wicket/blob/ac5e660c/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/AjaxLink.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/AjaxLink.java b/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/AjaxLink.java
index 359edd5..528663c 100644
--- a/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/AjaxLink.java
+++ b/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/AjaxLink.java
@@ -141,9 +141,10 @@ public abstract class AjaxLink<T> extends AbstractLink implements
IAjaxLink, IGe
 	}
 
 	@Override
-	public final void setModel(IModel<T> model)
+	public final AjaxLink<T> setModel(IModel<T> model)
 	{
 		setDefaultModel(model);
+		return this;
 	}
 
 	@Override
@@ -154,9 +155,10 @@ public abstract class AjaxLink<T> extends AbstractLink implements
IAjaxLink, IGe
 	}
 
 	@Override
-	public final void setModelObject(T object)
+	public final AjaxLink<T> setModelObject(T object)
 	{
 		setDefaultModelObject(object);
+		return this;
 	}
 
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/ac5e660c/wicket-core/src/main/java/org/apache/wicket/markup/html/GenericWebPage.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/GenericWebPage.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/GenericWebPage.java
index cbd56af..7159c9e 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/GenericWebPage.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/GenericWebPage.java
@@ -78,9 +78,10 @@ public class GenericWebPage<T> extends WebPage implements IGenericComponent<T>
 	}
 
 	@Override
-	public final void setModelObject(final T modelObject)
+	public final GenericWebPage<T> setModelObject(final T modelObject)
 	{
 		setDefaultModelObject(modelObject);
+		return this;
 	}
 
 	@Override
@@ -91,8 +92,9 @@ public class GenericWebPage<T> extends WebPage implements IGenericComponent<T>
 	}
 
 	@Override
-	public final void setModel(final IModel<T> model)
+	public final GenericWebPage<T> setModel(final IModel<T> model)
 	{
 		setDefaultModel(model);
+		return this;
 	}
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/ac5e660c/wicket-core/src/main/java/org/apache/wicket/markup/html/basic/EnumLabel.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/basic/EnumLabel.java
b/wicket-core/src/main/java/org/apache/wicket/markup/html/basic/EnumLabel.java
index 7a15dc3..0cd5c39 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/basic/EnumLabel.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/basic/EnumLabel.java
@@ -26,7 +26,7 @@ import org.apache.wicket.model.Model;
 import org.apache.wicket.util.lang.Classes;
 
 /**
- * A Label component that is used to render an enum value. The value renderered will be the
result
+ * A Label component that is used to render an enum value. The value rendered will be the
result
  * of a i18n resource lookup of the following form:
  * {@code <value.getClass().getSimpleName()>.<value.name()>}, this format can
be changed by
  * overriding {@link #resourceKey(Enum)}
@@ -129,9 +129,10 @@ public class EnumLabel<T extends Enum<T>> extends WebComponent
implements IGener
 	}
 
 	@Override
-	public final void setModel(IModel<T> model)
+	public final EnumLabel<T> setModel(IModel<T> model)
 	{
 		setDefaultModel(model);
+		return this;
 	}
 
 	@Override
@@ -142,9 +143,10 @@ public class EnumLabel<T extends Enum<T>> extends WebComponent
implements IGener
 	}
 
 	@Override
-	public final void setModelObject(T object)
+	public final EnumLabel<T> setModelObject(T object)
 	{
 		setDefaultModelObject(object);
+		return this;
 	}
 
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/ac5e660c/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractTextComponent.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractTextComponent.java
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractTextComponent.java
index 3d0e949..916ec86 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractTextComponent.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AbstractTextComponent.java
@@ -53,7 +53,7 @@ public abstract class AbstractTextComponent<T> extends FormComponent<T>
 	 * which are based on JavaScript and need some knowledge as to how to communicate properly
via
 	 * request parameters.
 	 */
-	public static interface ITextFormatProvider
+	public interface ITextFormatProvider
 	{
 		/**
 		 * Gets the pattern for printing output and parsing input.

http://git-wip-us.apache.org/repos/asf/wicket/blob/ac5e660c/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Check.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Check.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Check.java
index bc5c77b..3db9a02 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Check.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Check.java
@@ -243,9 +243,10 @@ public class Check<T> extends LabeledWebMarkupContainer implements
IGenericCompo
 	}
 
 	@Override
-	public final void setModel(IModel<T> model)
+	public final Check<T> setModel(IModel<T> model)
 	{
 		setDefaultModel(model);
+		return this;
 	}
 
 	@Override
@@ -256,12 +257,12 @@ public class Check<T> extends LabeledWebMarkupContainer implements
IGenericCompo
 	}
 
 	@Override
-	public final void setModelObject(T object)
+	public final Check<T> setModelObject(T object)
 	{
 		setDefaultModelObject(object);
+		return this;
 	}
 
-	/** {@inheritDoc} */
 	@Override
 	protected boolean getStatelessHint()
 	{

http://git-wip-us.apache.org/repos/asf/wicket/blob/ac5e660c/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
index f3fdbb8..1768051 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
@@ -2077,9 +2077,10 @@ public class Form<T> extends WebMarkupContainer
 	}
 
 	@Override
-	public final void setModel(IModel<T> model)
+	public final Form<T> setModel(IModel<T> model)
 	{
 		setDefaultModel(model);
+		return this;
 	}
 
 	@Override
@@ -2090,9 +2091,10 @@ public class Form<T> extends WebMarkupContainer
 	}
 
 	@Override
-	public final void setModelObject(T object)
+	public final Form<T> setModelObject(T object)
 	{
 		setDefaultModelObject(object);
+		return this;
 	}
 
 	/**
@@ -2119,7 +2121,7 @@ public class Form<T> extends WebMarkupContainer
 	}
 
 	/**
-	 * Produces javascript that registereds Wicket.Forms namespaces
+	 * Produces javascript that registers Wicket.Forms namespaces
 	 * 
 	 * @param response
 	 */

http://git-wip-us.apache.org/repos/asf/wicket/blob/ac5e660c/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java
index 32f720d..266def3 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java
@@ -1561,9 +1561,10 @@ public abstract class FormComponent<T> extends LabeledWebMarkupContainer
impleme
 	}
 
 	@Override
-	public final void setModel(IModel<T> model)
+	public final FormComponent<T> setModel(IModel<T> model)
 	{
 		setDefaultModel(model);
+		return this;
 	}
 
 	@SuppressWarnings("unchecked")
@@ -1574,9 +1575,10 @@ public abstract class FormComponent<T> extends LabeledWebMarkupContainer
impleme
 	}
 
 	@Override
-	public final void setModelObject(T object)
+	public final FormComponent<T> setModelObject(T object)
 	{
 		setDefaultModelObject(object);
+		return this;
 	}
 
 	/**

http://git-wip-us.apache.org/repos/asf/wicket/blob/ac5e660c/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Radio.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Radio.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Radio.java
index 282b711..2e224f0 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Radio.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Radio.java
@@ -228,9 +228,10 @@ public class Radio<T> extends LabeledWebMarkupContainer implements
IGenericCompo
 	}
 
 	@Override
-	public final void setModel(IModel<T> model)
+	public final Radio<T> setModel(IModel<T> model)
 	{
 		setDefaultModel(model);
+		return this;
 	}
 
 	@Override
@@ -241,9 +242,10 @@ public class Radio<T> extends LabeledWebMarkupContainer implements
IGenericCompo
 	}
 
 	@Override
-	public final void setModelObject(T object)
+	public final Radio<T> setModelObject(T object)
 	{
 		setDefaultModelObject(object);
+		return this;
 	}
 
 	/** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/wicket/blob/ac5e660c/wicket-core/src/main/java/org/apache/wicket/markup/html/link/Link.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/link/Link.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/link/Link.java
index fb33554..ffa4e4c 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/link/Link.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/link/Link.java
@@ -426,9 +426,10 @@ public abstract class Link<T> extends AbstractLink implements ILinkListener,
IGe
 	}
 
 	@Override
-	public final void setModel(IModel<T> model)
+	public final Link<T> setModel(IModel<T> model)
 	{
 		setDefaultModel(model);
+		return this;
 	}
 
 	@Override
@@ -439,9 +440,10 @@ public abstract class Link<T> extends AbstractLink implements ILinkListener,
IGe
 	}
 
 	@Override
-	public final void setModelObject(T object)
+	public final Link<T> setModelObject(T object)
 	{
 		setDefaultModelObject(object);
+		return this;
 	}
 
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/ac5e660c/wicket-core/src/main/java/org/apache/wicket/markup/html/list/ListItem.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/list/ListItem.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/list/ListItem.java
index 46c0824..88f6694 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/list/ListItem.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/list/ListItem.java
@@ -82,9 +82,10 @@ public class ListItem<T> extends LoopItem implements IGenericComponent<T>,
 IQue
 	}
 
 	@Override
-	public final void setModel(IModel<T> model)
+	public final ListItem<T> setModel(IModel<T> model)
 	{
 		setDefaultModel(model);
+		return this;
 	}
 
 	@Override
@@ -95,9 +96,10 @@ public class ListItem<T> extends LoopItem implements IGenericComponent<T>,
 IQue
 	}
 
 	@Override
-	public final void setModelObject(T object)
+	public final ListItem<T> setModelObject(T object)
 	{
 		setDefaultModelObject(object);
+		return this;
 	}
 	
 	@Override

http://git-wip-us.apache.org/repos/asf/wicket/blob/ac5e660c/wicket-core/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigationLink.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigationLink.java
b/wicket-core/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigationLink.java
index 461a9e0..f0862a3 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigationLink.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigationLink.java
@@ -129,11 +129,11 @@ public class PagingNavigationLink<T> extends Link<T>
 	 * @param page
 	 *            The page
 	 * @return True if this link links to the given page
-	 * @see org.apache.wicket.markup.html.link.PageLink#linksTo(org.apache.wicket.Page)
+	 * @see org.apache.wicket.markup.html.link.Link#linksTo(org.apache.wicket.Page)
 	 */
 	@Override
 	public final boolean linksTo(final Page page)
 	{
 		return getPageNumber() == pageable.getCurrentPage();
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/ac5e660c/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/GenericPanel.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/GenericPanel.java
b/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/GenericPanel.java
index df1e377..1f8d6e1 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/GenericPanel.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/GenericPanel.java
@@ -68,9 +68,10 @@ public class GenericPanel<T> extends Panel implements IGenericComponent<T>
 	 *            the new model object
 	 */
 	@Override
-	public final void setModelObject(final T modelObject)
+	public final GenericPanel<T> setModelObject(final T modelObject)
 	{
 		setDefaultModelObject(modelObject);
+		return this;
 	}
 
 	/**
@@ -92,8 +93,9 @@ public class GenericPanel<T> extends Panel implements IGenericComponent<T>
 	 *            the new model
 	 */
 	@Override
-	public final void setModel(final IModel<T> model)
+	public final GenericPanel<T> setModel(final IModel<T> model)
 	{
 		setDefaultModel(model);
+		return this;
 	}
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/ac5e660c/wicket-datetime/src/main/java/org/apache/wicket/datetime/markup/html/basic/DateLabel.java
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/datetime/markup/html/basic/DateLabel.java
b/wicket-datetime/src/main/java/org/apache/wicket/datetime/markup/html/basic/DateLabel.java
index 6f5610b..e4e66d6 100644
--- a/wicket-datetime/src/main/java/org/apache/wicket/datetime/markup/html/basic/DateLabel.java
+++ b/wicket-datetime/src/main/java/org/apache/wicket/datetime/markup/html/basic/DateLabel.java
@@ -313,13 +313,15 @@ public class DateLabel extends Label implements IGenericComponent<Date>
 	}
 
 	@Override
-	public void setModel(IModel<Date> model) {
+	public DateLabel setModel(IModel<Date> model) {
 		super.setDefaultModel(model);
+		return this;
 	}
 
 	@Override
-	public void setModelObject(Date object) {
+	public DateLabel setModelObject(Date object) {
 		super.setDefaultModelObject(object);
+		return this;
 	}
 
 	@Override

http://git-wip-us.apache.org/repos/asf/wicket/blob/ac5e660c/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 81a9e33..c7ebdfe 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
@@ -279,15 +279,17 @@ public class AjaxEditableLabel<T> extends Panel implements IGenericComponent<T>
 	}
 
 	@Override
-	public void setModel(IModel<T> model)
+	public AjaxEditableLabel<T> setModel(IModel<T> model)
 	{
 		setDefaultModel(model);
+		return this;
 	}
 
 	@Override
-	public void setModelObject(T object)
+	public AjaxEditableLabel<T> setModelObject(T object)
 	{
 		setDefaultModelObject(object);
+		return this;
 	}
 
 	/**

http://git-wip-us.apache.org/repos/asf/wicket/blob/ac5e660c/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/select/SelectOption.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/select/SelectOption.java
b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/select/SelectOption.java
index 16833d9..5478525 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/select/SelectOption.java
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/select/SelectOption.java
@@ -67,9 +67,10 @@ public class SelectOption<T> extends WebMarkupContainer implements
IGenericCompo
 	}
 
 	@Override
-	public final void setModel(IModel<T> model)
+	public final SelectOption<T> setModel(IModel<T> model)
 	{
 		setDefaultModel(model);
+		return this;
 	}
 
 	@SuppressWarnings("unchecked")
@@ -80,9 +81,10 @@ public class SelectOption<T> extends WebMarkupContainer implements
IGenericCompo
 	}
 
 	@Override
-	public void setModelObject(T object)
+	public SelectOption<T> setModelObject(T object)
 	{
 		setDefaultModelObject(object);
+		return this;
 	}
 
 	/**

http://git-wip-us.apache.org/repos/asf/wicket/blob/ac5e660c/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/AbstractTree.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/AbstractTree.java
b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/AbstractTree.java
index f8105f5..439c0c7 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/AbstractTree.java
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/AbstractTree.java
@@ -168,9 +168,10 @@ public abstract class AbstractTree<T> extends Panel implements
IGenericComponent
 	 *            the model
 	 */
 	@Override
-	public void setModel(IModel<Set<T>> model)
+	public AbstractTree<T> setModel(IModel<Set<T>> model)
 	{
 		setDefaultModel(model);
+		return this;
 	}
 
 	/**
@@ -180,9 +181,10 @@ public abstract class AbstractTree<T> extends Panel implements
IGenericComponent
 	 *            the model object
 	 */
 	@Override
-	public void setModelObject(Set<T> state)
+	public AbstractTree<T> setModelObject(Set<T> state)
 	{
 		setDefaultModelObject(state);
+		return this;
 	}
 
 	/**


Mime
View raw message