public abstract class AbstractFormValidator extends Behavior implements IFormValidator
IFormValidator
s.Constructor and Description |
---|
AbstractFormValidator() |
Modifier and Type | Method and Description |
---|---|
void |
bind(Component component)
Can be bound to
Form s only. |
void |
error(FormComponent<?> fc)
Reports an error against validatable using the map returned by
variablesMap() for
variable interpolations and message key returned by resourceKey() . |
void |
error(FormComponent<?> fc,
Map<String,Object> vars)
Reports an error against the validatable using the given map for variable interpolations and
message resource key provided by
resourceKey() |
void |
error(FormComponent<?> fc,
String resourceKey)
Reports an error against the validatable using the given resource key
|
void |
error(FormComponent<?> fc,
String resourceKey,
Map<String,Object> vars)
Reports an error against the validatable using the specified resource key and variable map
|
protected String |
resourceKey()
Gets the resource key for validator's error message from the ApplicationSettings class.
|
protected Map<String,Object> |
variablesMap()
Gets the default variables for interpolation.
|
afterRender, beforeRender, canCallListenerInterface, detach, getStatelessHint, isEnabled, isTemporary, onComponentTag, onConfigure, onEvent, onException, onRemove, renderHead, unbind
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDependentFormComponents, validate
public void bind(Component component)
Form
s only.bind
in class Behavior
component
- the component to bind toWicketRuntimeException
- if component is not a formpublic void error(FormComponent<?> fc)
variablesMap()
for
variable interpolations and message key returned by resourceKey()
.fc
- form component against which the error is reportedpublic void error(FormComponent<?> fc, String resourceKey)
fc
- form component against which the error is reportedresourceKey
- The message resource key to usepublic void error(FormComponent<?> fc, Map<String,Object> vars)
resourceKey()
fc
- form component against which the error is reportedvars
- variables for variable interpolationpublic void error(FormComponent<?> fc, String resourceKey, Map<String,Object> vars)
fc
- form component against which the error is reportedresourceKey
- The message resource key to usevars
- The model for variable interpolationprotected Map<String,Object> variablesMap()
protected String resourceKey()
Copyright © 2006–2014 Apache Software Foundation. All rights reserved.