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.


Constructor Index

 o Model()

Method Index

 o activateValidationDisplay()
 o displayFailedValidations()
Return a list of failed form validations in red.
 o 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.

Constructors

 o Model
 public Model()

Methods

 o 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.

 o 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.

 o activateValidationDisplay
 public void activateValidationDisplay()

All Packages  Class Hierarchy  This Package  Previous  Next  Index