com.nordija.tapestry.bayeux.delegate
Class RequiredValidationDelegate

java.lang.Object
  extended by org.apache.tapestry.valid.ValidationDelegate
      extended by com.nordija.tapestry.bayeux.delegate.RequiredValidationDelegate
All Implemented Interfaces:
java.io.Serializable, org.apache.tapestry.valid.IValidationDelegate

public class RequiredValidationDelegate
extends org.apache.tapestry.valid.ValidationDelegate

This validation delegate automatically marks required fields with a '!' mark and a 'required' css class to the marker.

At the same time it overwrites the default marking of fields in error. Only one * is added and it uses a css class 'error' to mark the single star.

Since:
2.0.0
Version:
$Id: ClickOnce.java 93 2007-05-19 09:21:20Z jeyben $
Author:
Jacob von Eyben www.nordija.com
See Also:
Serialized Form

Constructor Summary
RequiredValidationDelegate()
           
 
Method Summary
 void writeSuffix(org.apache.tapestry.IMarkupWriter writer, org.apache.tapestry.IRequestCycle cycle, org.apache.tapestry.form.IFormComponent component, org.apache.tapestry.valid.IValidator validator)
           
 
Methods inherited from class org.apache.tapestry.valid.ValidationDelegate
afterLabelText, beforeLabelText, clear, clearErrors, findCurrentTracking, getAssociatedTrackings, getComponentTracking, getCurrentFieldTracking, getErrorRenderers, getFieldInputValue, getFieldTracking, getFirstError, getFocusField, getHasErrors, getUnassociatedTrackings, isInError, isInError, record, record, record, record, recordFieldInputValue, registerForFocus, reset, setFormComponent, writeAttributes, writeLabelAttributes, writeLabelPrefix, writeLabelSuffix, writePrefix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequiredValidationDelegate

public RequiredValidationDelegate()
Method Detail

writeSuffix

public void writeSuffix(org.apache.tapestry.IMarkupWriter writer,
                        org.apache.tapestry.IRequestCycle cycle,
                        org.apache.tapestry.form.IFormComponent component,
                        org.apache.tapestry.valid.IValidator validator)
Specified by:
writeSuffix in interface org.apache.tapestry.valid.IValidationDelegate
Overrides:
writeSuffix in class org.apache.tapestry.valid.ValidationDelegate


Copyright © 2004-2007 Nordija A/S. All Rights Reserved.