All Packages Class Hierarchy This Package Previous Next Index
Class com.startups.webui.Model
java.lang.Object
|
+----com.startups.validation.ValidatableObject
|
+----com.startups.webui.Model
- public abstract class Model
- extends ValidatableObject
The base class of all Model objects, which represent
the dynamic state of a web page. Each page is
represented by a Model object, a ControllerServlet,
and one or more views implemented as jsp pages.
Model contains some generic presentation
convenience methods to be called from jsp pages.
-
Model()
-
-
activateValidationDisplay()
-
-
displayFailedValidations()
- Return a list of failed form validations in red.
-
fontColorTagFor(String)
- Returns a red font color tag if the given fieldName in the given
model is invalid, otherwise returns a black font color tag.
Model
public Model()
fontColorTagFor
public String fontColorTagFor(String fieldName)
- Returns a red font color tag if the given fieldName in the given
model is invalid, otherwise returns a black font color tag.
In order for this method to work properly, there
should be a validation method with the signature
public void validate() throws
ValidationFailedException
.
displayFailedValidations
public String displayFailedValidations()
- Return a list of failed form validations in red.
The display will look something like this:
Please review the indicated fields:
...
If all validations passed, return an empty string.
activateValidationDisplay
public void activateValidationDisplay()
All Packages Class Hierarchy This Package Previous Next Index