You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by iv...@apache.org on 2008/07/28 19:16:29 UTC

svn commit: r680405 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/AttributeModifier.java

Author: ivaynberg
Date: Mon Jul 28 10:16:28 2008
New Revision: 680405

URL: http://svn.apache.org/viewvc?rev=680405&view=rev
Log:
WICKET-1759 spelling error in method name

Modified:
    wicket/trunk/wicket/src/main/java/org/apache/wicket/AttributeModifier.java

Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/AttributeModifier.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/AttributeModifier.java?rev=680405&r1=680404&r2=680405&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/AttributeModifier.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/AttributeModifier.java Mon Jul 28 10:16:28 2008
@@ -85,7 +85,7 @@
 	private final String pattern;
 
 	/** The model that is to be used for the replacement. */
-	private final IModel< ? > replaceModel;
+	private final IModel<?> replaceModel;
 
 	/**
 	 * Create a new attribute modifier with the given attribute name and model to replace with. The
@@ -99,7 +99,7 @@
 	 *            The model to replace the value with
 	 */
 	public AttributeModifier(final String attribute, final boolean addAttributeIfNotPresent,
-		final IModel< ? > replaceModel)
+		final IModel<?> replaceModel)
 	{
 		this(attribute, null, addAttributeIfNotPresent, replaceModel);
 	}
@@ -113,7 +113,7 @@
 	 * @param replaceModel
 	 *            The model to replace the value with
 	 */
-	public AttributeModifier(final String attribute, final IModel< ? > replaceModel)
+	public AttributeModifier(final String attribute, final IModel<?> replaceModel)
 	{
 		this(attribute, null, false, replaceModel);
 	}
@@ -135,7 +135,7 @@
 	 *            The model to replace the value with
 	 */
 	public AttributeModifier(final String attribute, final String pattern,
-		final boolean addAttributeIfNotPresent, final IModel< ? > replaceModel)
+		final boolean addAttributeIfNotPresent, final IModel<?> replaceModel)
 	{
 		if (attribute == null)
 		{
@@ -162,7 +162,7 @@
 	 *            The model to replace the value with
 	 */
 	public AttributeModifier(final String attribute, final String pattern,
-		final IModel< ? > replaceModel)
+		final IModel<?> replaceModel)
 	{
 		this(attribute, pattern, false, replaceModel);
 	}
@@ -240,7 +240,7 @@
 	{
 		if (tag.getType() != XmlTag.CLOSE)
 		{
-			replaceAttibuteValue(component, tag);
+			replaceAttributeValue(component, tag);
 		}
 	}
 
@@ -253,8 +253,26 @@
 	 *            The component
 	 * @param tag
 	 *            The tag to replace the attribute value for
+	 * 
+	 * @deprecated see {@link #replaceAttributeValue(Component, ComponentTag)}
+	 */
+	@Deprecated
+	public void replaceAttibuteValue(final Component component, final ComponentTag tag)
+	{
+		replaceAttributeValue(component, tag);
+	}
+
+	/**
+	 * Checks the given component tag for an instance of the attribute to modify and if all criteria
+	 * are met then replace the value of this attribute with the value of the contained model
+	 * object.
+	 * 
+	 * @param component
+	 *            The component
+	 * @param tag
+	 *            The tag to replace the attribute value for
 	 */
-	public final void replaceAttibuteValue(final Component component, final ComponentTag tag)
+	public final void replaceAttributeValue(final Component component, final ComponentTag tag)
 	{
 		if (isEnabled(component))
 		{
@@ -352,7 +370,7 @@
 	 */
 	private Object getReplacementOrNull(final Component component)
 	{
-		IModel< ? > model = replaceModel;
+		IModel<?> model = replaceModel;
 		if (model instanceof IComponentAssignedModel)
 		{
 			model = ((IComponentAssignedModel)model).wrapOnAssignment(component);
@@ -376,7 +394,7 @@
 	 * 
 	 * @return the replace model of this attribute modifier
 	 */
-	protected final IModel< ? > getReplaceModel()
+	protected final IModel<?> getReplaceModel()
 	{
 		return replaceModel;
 	}