org.apache.myfaces.custom.equalvalidator

Class EqualValidator

Implemented Interfaces:
StateHolder, Validator

public class EqualValidator
extends java.lang.Object
implements Validator, StateHolder

Version:
$Revision: 178130 $ $Date: 2005-05-24 09:24:46 +0200 (Tue, 24 May 2005) $
Author:
mwessendorf (latest modification by $Author: mmarinschek $)

Field Summary

static String
EQUAL_MESSAGE_ID
The message identifier of the FacesMessage to be created if the equal_for check fails.
static String
VALIDATOR_ID
The standard converter id for this converter.

Constructor Summary

EqualValidator()

Method Summary

String
getFor()
boolean
isTransient()
void
restoreState(FacesContext context, Object state)
Object
saveState(FacesContext context)
void
setFor(String string)
void
setTransient(boolean newTransientValue)
void
validate(FacesContext facesContext, UIComponent uiComponent, Object value)

Field Details

EQUAL_MESSAGE_ID

public static final String EQUAL_MESSAGE_ID
The message identifier of the FacesMessage to be created if the equal_for check fails.

VALIDATOR_ID

public static final String VALIDATOR_ID
The standard converter id for this converter.

Constructor Details

EqualValidator

public EqualValidator()

Method Details

getFor

public String getFor()
Returns:
the foreign component_id, on which a value should be validated

isTransient

public boolean isTransient()

restoreState

public void restoreState(FacesContext context,
                         Object state)

saveState

public Object saveState(FacesContext context)

setFor

public void setFor(String string)
Parameters:
string - the foreign component_id, on which a value should be validated

setTransient

public void setTransient(boolean newTransientValue)

validate

public void validate(FacesContext facesContext,
                     UIComponent uiComponent,
                     Object value)
            throws ValidatorException