public class ComponentVisualErrorBehaviour
extends org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior
FormComponent is valid. Valid FormComponent objects get the CSS class
'formcomponent valid' and invalid FormComponent objects get the CSS class 'formcomponent invalid'.
See AjaxFormComponentUpdatingBehavior for more details over the parent class.
You can use this code under Apache 2.0 license, as long as you retain the copyright messages.
Tested with Wicket 1.3.4| Constructor and Description |
|---|
ComponentVisualErrorBehaviour(String event,
org.apache.wicket.Component updateComponent)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
onError(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget,
RuntimeException e)
Listener invoked on the ajax request.
|
protected void |
onUpdate(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Listener invoked on the ajax request.
|
checkComponent, disableFocusOnBlur, getFormComponent, getUpdateModel, onBind, onEvent, updateAjaxAttributesgetEvent, onCheckEvent, renderHead, respondfindIndicatorId, getAttributes, getCallbackFunction, getCallbackFunctionBody, getCallbackScript, getCallbackScript, getChannel, getFailureScript, getPreconditionScript, getSuccessScript, onRequest, postprocessConfiguration, renderAjaxAttributes, renderAjaxAttributesafterRender, bind, getCallbackUrl, getComponent, onComponentRendered, onComponentTag, onComponentTag, onUnbind, unbindpublic ComponentVisualErrorBehaviour(String event, org.apache.wicket.Component updateComponent)
event - of type String (for example 'onblur', 'onkeyup', etc.)updateComponent - is the Component that must be updated (for example the FeedbackLabel
containing the error message for this FormComponent)protected void onError(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget,
RuntimeException e)
Component's model has been
updated. Handles the change of a css class when an error has occurred.onError in class org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehaviorajaxRequestTarget - of type AjaxRequestTargete - of type RuntimeExceptionprotected void onUpdate(org.apache.wicket.ajax.AjaxRequestTarget ajaxRequestTarget)
Component's model has been
updated. Handles the change of a css class when validation was succesful.onUpdate in class org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehaviorajaxRequestTarget - of type AjaxRequestTargetCopyright © 2008-2016 The Sakai Foundation. All Rights Reserved.