org.musicontroller.gui
Class NextToFieldErrorDisplayDelegate

java.lang.Object
  extended by org.apache.tapestry.valid.ValidationDelegate
      extended by org.musicontroller.gui.NextToFieldErrorDisplayDelegate
All Implemented Interfaces:
java.io.Serializable, org.apache.tapestry.valid.IValidationDelegate

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

Displays validation errors in the add user form.

Version:
$Id: NextToFieldErrorDisplayDelegate.java,v 1.1 2010/03/16 18:55:42 varienaja Exp $
Author:
Hans Drexler
See Also:
Serialized Form

Constructor Summary
NextToFieldErrorDisplayDelegate()
           
 
Method Summary
 void writeLabelAttributes(org.apache.tapestry.IMarkupWriter writer, org.apache.tapestry.IRequestCycle cycle, org.apache.tapestry.form.IFormComponent component)
          Adds a class style attribute to the label if in error
 void writePrefix(org.apache.tapestry.IMarkupWriter writer, org.apache.tapestry.IRequestCycle cycle, org.apache.tapestry.form.IFormComponent component, org.apache.tapestry.valid.IValidator validator)
          This method is overwritten so that the error message generated during server-side validation actually appears next to the field in question.
 
Methods inherited from class org.apache.tapestry.valid.ValidationDelegate
afterLabelText, beforeLabelText, clear, clearErrors, findCurrentTracking, getAssociatedTrackings, getComponentTracking, getCurrentFieldTracking, getErrorRenderers, getFieldInputValue, getFieldTracking, getFieldTracking, getFirstError, getFocusField, getHasErrors, getUnassociatedTrackings, isInError, isInError, record, record, record, record, recordFieldInputValue, registerForFocus, reset, setFormComponent, writeAttributes, writeLabelPrefix, writeLabelSuffix, writeSuffix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NextToFieldErrorDisplayDelegate

public NextToFieldErrorDisplayDelegate()
Method Detail

writePrefix

public void writePrefix(org.apache.tapestry.IMarkupWriter writer,
                        org.apache.tapestry.IRequestCycle cycle,
                        org.apache.tapestry.form.IFormComponent component,
                        org.apache.tapestry.valid.IValidator validator)
This method is overwritten so that the error message generated during server-side validation actually appears next to the field in question. Don't be confused by the method names, there is a complimenting writeSuffix for fields, as well as a pair of writeLabelSuffix/writeLabelPrefix methods to do the same to labels.

Specified by:
writePrefix in interface org.apache.tapestry.valid.IValidationDelegate
Overrides:
writePrefix in class org.apache.tapestry.valid.ValidationDelegate

writeLabelAttributes

public void writeLabelAttributes(org.apache.tapestry.IMarkupWriter writer,
                                 org.apache.tapestry.IRequestCycle cycle,
                                 org.apache.tapestry.form.IFormComponent component)
Adds a class style attribute to the label if in error

Specified by:
writeLabelAttributes in interface org.apache.tapestry.valid.IValidationDelegate
Overrides:
writeLabelAttributes in class org.apache.tapestry.valid.ValidationDelegate


Copyright © 2010 A.J.V.. All Rights Reserved.