org.hackystat.projectbrowser.page.projectportfolio.configurationpanel
Class ConfigurationValueValidator
java.lang.Object
org.apache.wicket.markup.html.form.validation.AbstractFormValidator
org.hackystat.projectbrowser.page.projectportfolio.configurationpanel.ConfigurationValueValidator
- All Implemented Interfaces:
- java.io.Serializable, org.apache.wicket.IClusterable, org.apache.wicket.markup.html.form.validation.IFormValidator
public class ConfigurationValueValidator
- extends org.apache.wicket.markup.html.form.validation.AbstractFormValidator
Validator that valid values in configuration form.
Make sure the higher value is no smaller than the lower value.
- Author:
- Shaoxuan Zhang
- See Also:
- Serialized Form
Constructor Summary |
ConfigurationValueValidator(java.lang.String measureName,
org.apache.wicket.markup.html.form.TextField higherValueTextField,
org.apache.wicket.markup.html.form.TextField lowerValueTextField)
|
Method Summary |
org.apache.wicket.markup.html.form.FormComponent[] |
getDependentFormComponents()
|
void |
validate(org.apache.wicket.markup.html.form.Form form)
This method is ran if all components returned by getDependentFormComponents() are valid. |
protected java.util.Map |
variablesMap()
Gets the default variables for interpolation. |
Methods inherited from class org.apache.wicket.markup.html.form.validation.AbstractFormValidator |
error, error, error, error, messageModel, resourceKey |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConfigurationValueValidator
public ConfigurationValueValidator(java.lang.String measureName,
org.apache.wicket.markup.html.form.TextField higherValueTextField,
org.apache.wicket.markup.html.form.TextField lowerValueTextField)
- Parameters:
measureName
- The name of the measure the two values belong to.higherValueTextField
- The TextField with higher value.lowerValueTextField
- The TextField with lower value.
getDependentFormComponents
public org.apache.wicket.markup.html.form.FormComponent[] getDependentFormComponents()
- Returns:
- array of FormComponents that this validator depends on
validate
public void validate(org.apache.wicket.markup.html.form.Form form)
- This method is ran if all components returned by getDependentFormComponents() are valid.
- Parameters:
form
- - form this validator is added to
variablesMap
protected java.util.Map variablesMap()
- Gets the default variables for interpolation.
- Overrides:
variablesMap
in class org.apache.wicket.markup.html.form.validation.AbstractFormValidator
- Returns:
- a map with the variables for interpolation