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/10/15 22:48:30 UTC

svn commit: r705039 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java

Author: ivaynberg
Date: Wed Oct 15 13:48:30 2008
New Revision: 705039

URL: http://svn.apache.org/viewvc?rev=705039&view=rev
Log:
added new convinience validatable factory method

Modified:
    wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java

Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java?rev=705039&r1=705038&r2=705039&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java Wed Oct 15 13:48:30 2008
@@ -1561,7 +1561,7 @@
 	{
 		final int size = validators_size();
 
-		final IValidatable<T> validatable = new ValidatableAdapter();
+		final IValidatable<T> validatable = newValidatable();
 
 		int i = 0;
 		IValidator<T> validator = null;
@@ -1591,6 +1591,16 @@
 		}
 	}
 
+	/**
+	 * Creates an IValidatable that can be used to validate this form component. This validatable
+	 * encorporates error key lookups that correspend to this form component.
+	 * 
+	 * @return IValidatable<T> for this form component
+	 */
+	public final IValidatable<T> newValidatable()
+	{
+		return new ValidatableAdapter();
+	}
 
 	/**
 	 * Gets model