org.apache.tapestry.form
Interface ValidatableFieldExtension

All Superinterfaces:
IComponent, IFormComponent, IRender, org.apache.hivemind.Locatable, org.apache.hivemind.LocationHolder, ValidatableField
All Known Implementing Classes:
Palette

public interface ValidatableFieldExtension
extends ValidatableField

Marker interface for components that would like to override the default logic used to render validation contributions made for client side form validation.

Author:
jkuhnert

Method Summary
 void overrideContributions(Validator validator, FormComponentContributorContext context, IMarkupWriter writer, IRequestCycle cycle)
          Very similar to the method signature used by ValidatableFieldSupport.renderContributions(ValidatableField, IMarkupWriter, IRequestCycle), with the additional parameter being the Validator that this component has chosen to override.
 boolean overrideValidator(Validator validator, IRequestCycle cycle)
          Called during render of the specified component.
 
Methods inherited from interface org.apache.tapestry.form.ValidatableField
getValidators
 
Methods inherited from interface org.apache.tapestry.form.IFormComponent
getClientId, getDisplayName, getForm, getName, isDisabled, isRequired, setName
 
Methods inherited from interface org.apache.tapestry.IComponent
addAsset, addBody, addComponent, enterActiveState, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainedComponent, getContainer, getEventInvoker, getExtendedId, getId, getIdPath, getListeners, getMessages, getNamespace, getPage, getSpecification, getSpecifiedId, getTemplateTagName, isRendering, peekClientId, renderBody, setBinding, setClientId, setContainedComponent, setContainer, setId, setNamespace, setPage, setTemplateTagName
 
Methods inherited from interface org.apache.tapestry.IRender
render
 
Methods inherited from interface org.apache.hivemind.LocationHolder
setLocation
 
Methods inherited from interface org.apache.hivemind.Locatable
getLocation
 

Method Detail

overrideValidator

boolean overrideValidator(Validator validator,
                          IRequestCycle cycle)
Called during render of the specified component. Renders any contributions from validators. Check to see if this field would like to override the default contributions made by the specified Validator with it's own contributions.

Parameters:
validator - The validator to check if component wants to override.
cycle - The current request cycle.
Returns:
True if this field wants to override default, false otherwise.

overrideContributions

void overrideContributions(Validator validator,
                           FormComponentContributorContext context,
                           IMarkupWriter writer,
                           IRequestCycle cycle)
Very similar to the method signature used by ValidatableFieldSupport.renderContributions(ValidatableField, IMarkupWriter, IRequestCycle), with the additional parameter being the Validator that this component has chosen to override.

This method will only be called if overrideValidator(Validator, IRequestCycle) returns true for the specified Validator.

Parameters:
validator - The original Validator that component opted to override.
context - The context object used by validation contributors.
writer - The markup writer to send content to. (if any is needed)
cycle - The current request cycle.


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.