nl.gx.webmanager.handler.forms.validation
Class DefaultProfileLoginValidator

java.lang.Object
  extended by nl.gx.webmanager.handler.forms.validation.DefaultProfileLoginValidator
All Implemented Interfaces:
FormComponent, Validator

public class DefaultProfileLoginValidator
extends java.lang.Object
implements Validator

Provides login validation for the DefaultProfile of the UserManagement bundle. It expects a formpart for the username and password and will retrieve the entered values from the formflow. The DefaultProfileProvider is called for validation.

Variable Type Mode Default Description
username Parameter Required -- The username of the user to validate.
password Parameter Required -- The password to validate.
messageformpart Optional - The formpart where the validation message should be displayed. If there is no messageformpart, the message is displayed on the form instead of a formpart.
Example usage:


Field Summary
static java.lang.String NOT_FOUND
           
 
Constructor Summary
DefaultProfileLoginValidator()
           
 
Method Summary
 void init(FormComponentConfig config)
          Passes the initialization parameters to the component.
 ValidatorMessage[] validate(FormDefinition form, State formState, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Performs validation on a form and returns an array of validator messages, containing errors detected in the submitted values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOT_FOUND

public static final java.lang.String NOT_FOUND
See Also:
Constant Field Values
Constructor Detail

DefaultProfileLoginValidator

public DefaultProfileLoginValidator()
Method Detail

init

public void init(FormComponentConfig config)
          throws InitializationException
Passes the initialization parameters to the component.

Specified by:
init in interface FormComponent
Parameters:
config - The FormComponentConfig object that contains configutation information for this component.
Throws:
InitializationException - If initialization failed

validate

public ValidatorMessage[] validate(FormDefinition form,
                                   State formState,
                                   javax.servlet.http.HttpServletRequest req,
                                   javax.servlet.http.HttpServletResponse res)
Performs validation on a form and returns an array of validator messages, containing errors detected in the submitted values.

Specified by:
validate in interface Validator
Parameters:
form - The form that should be validated
formState - The object representing the state of the formflow. This object provides access to values submitted by the client and the exceptions and validator messages for the form.
req - The http servlet request
res - The http servlet response
Returns:
The array of validator messages, containing validation errors for the form.


Copyright © 2007-2011 GX Software BV. All Rights Reserved.