You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by eh...@apache.org on 2004/02/12 18:05:20 UTC
cvs commit: jakarta-tapestry/framework/src/org/apache/tapestry/valid IValidationDelegate.java IValidator.java
ehatcher 2004/02/12 09:05:20
Modified: framework/src/org/apache/tapestry/valid
IValidationDelegate.java IValidator.java
Log:
typo corrections
Revision Changes Path
1.6 +37 -37 jakarta-tapestry/framework/src/org/apache/tapestry/valid/IValidationDelegate.java
Index: IValidationDelegate.java
===================================================================
RCS file: /home/cvs/jakarta-tapestry/framework/src/org/apache/tapestry/valid/IValidationDelegate.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- IValidationDelegate.java 19 Jan 2004 21:32:25 -0000 1.5
+++ IValidationDelegate.java 12 Feb 2004 17:05:19 -0000 1.6
@@ -23,13 +23,13 @@
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
- * 4. The names "Apache" and "Apache Software Foundation", "Tapestry"
+ * 4. The names "Apache" and "Apache Software Foundation", "Tapestry"
* must not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache@apache.org.
*
- * 5. Products derived from this software may not be called "Apache"
- * or "Tapestry", nor may "Apache" or "Tapestry" appear in their
+ * 5. Products derived from this software may not be called "Apache"
+ * or "Tapestry", nor may "Apache" or "Tapestry" appear in their
* name, without prior written permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
@@ -66,13 +66,13 @@
* Interface used to track validation errors in forms and
* {@link IFormComponent}s (including {@link org.apache.tapestry.form.AbstractTextField}
* and its subclasses).
- *
+ *
* <p>In addition,
* controls how fields that are in error are presented (they can be
* marked in various ways by the delegate; the default implementation
* adds two red asterisks to the right of the field).
*
- * <p>The interface is designed so that a single instance is be shared
+ * <p>The interface is designed so that a single instance can be shared
* with many instances of {@link IFormComponent}.
*
* <p>Starting with release 1.0.8, this interface was extensively revised
@@ -80,16 +80,16 @@
* invalid values (during a request cycle) to the delegate. It has evolved from
* a largely stateless conduit for error messages into a very stateful tracker
* of field state.
- *
+ *
* <p>Starting with release 1.0.9, this interface was <em>again</em>
* reworked, to allow tracking of errors in {@link IFormComponent form components},
* and to allow unassociated (with any field) errors
* to be tracked.
- *
+ *
* <p><b>Fields vs. Form Components</b><br>
* For most simple forms, these terms are pretty much synonymous.
* Your form will render normally, and each form component will render
- * only once. Some of your form components will by {@link ValidField}
+ * only once. Some of your form components will be {@link ValidField}
* components and handle most of
* their validation internally (with the help of {@link IValidator} objects).
* In addition, your form listener may do additional validation and notify
@@ -98,29 +98,29 @@
* with any particular field.
*
* <p>
- * But what happens if you use a {@link org.apache.tapestry.components.Foreach} or
+ * But what happens if you use a {@link org.apache.tapestry.components.Foreach} or
* {@link org.apache.tapestry.form.ListEdit} inside your form?
* Some of your components will render multiple times. In this case you will have
* multiple <em>fields</em>. Each field will have a unique field name (you can see this
* in the generated HTML). It is this field name that the delegate keys off of, which
* means that some fields generated by a component may have errors and some may not, it
* all works fine (with one exception).
- *
+ *
* <p><b>The Exception</b><br>
* The problem is that a component doesn't know its field name until its
* <code>render()</code> method is invoked (at which point, it allocates a unique field
* name from the {@link org.apache.tapestry.IForm#getElementId(org.apache.tapestry.form.IFormComponent)}.
* This is not a problem for the field or its
* {@link IValidator}, but screws things up for the {@link FieldLabel}.
- *
+ *
* <p>Typically, the label is rendered <em>before</em> the corresponding form component.
* Form components leave their last assigned field name in their
* {@link IFormComponent#getName() name property}. So if the form component is in any kind of
- * loop, the {@link FieldLabel} will key its name,
+ * loop, the {@link FieldLabel} will key its name,
* {@link IFormComponent#getDisplayName() display name} and error status off of
* its last renderred value. So the moral of the story is don't use
* {@link FieldLabel} in this situation.
- *
+ *
*
* @author Howard Lewis Ship
* @version $Id$
@@ -130,14 +130,14 @@
public interface IValidationDelegate
{
/**
- * Invoked before other methods to configure the delegate for the given
+ * Invoked before other methods to configure the delegate for the given
* form component. Sets the current field based on
* the {@link IFormComponent#getName() name} of the form component
* (which is almost always a {@link ValidField}).
- *
+ *
* <p>The caller should invoke this with a parameter of null to record
* unassociated global errors (errors not associated with any particular field).
- *
+ *
* @since 1.0.8
*
**/
@@ -147,9 +147,9 @@
/**
* Returns true if the current component is in error (that is, had bad input
* submitted by the end user).
- *
+ *
* @since 1.0.8
- *
+ *
**/
public boolean isInError();
@@ -157,9 +157,9 @@
/**
* Returns the string submitted by the client as the value for
* the current field.
- *
+ *
* @since 1.0.8
- *
+ *
**/
public String getFieldInputValue();
@@ -167,9 +167,9 @@
/**
* Returns a {@link List} of {@link IFieldTracking}, in default order
* (the order in which fields are renderred). A caller should
- * not change the values (the List is immutable).
+ * not change the values (the List is immutable).
* May return null if no fields are in error.
- *
+ *
* @since 1.0.8
**/
@@ -179,18 +179,18 @@
* Resets any tracking information for the current field. This will
* clear the field's inError flag, and set its error message and invalid input value
* to null.
- *
+ *
* @since 1.0.8
- *
+ *
**/
public void reset();
/**
* Clears all tracking information.
- *
+ *
* @since 1.0.10
- *
+ *
**/
public void clear();
@@ -199,9 +199,9 @@
* Records the user's input for the current form component. Input should
* be recorded even if there isn't an explicit error, since later form-wide
* validations may discover an error in the field.
- *
+ *
* @since 3.0
- *
+ *
**/
public void recordFieldInputValue(String input);
@@ -209,14 +209,14 @@
/**
* The error notification method, invoked during the rewind phase
* (that is, while HTTP parameters are being extracted from the request
- * and assigned to various object properties).
+ * and assigned to various object properties).
*
* <p>Typically, the delegate simply invokes
* {@link #record(String, ValidationConstraint)} or
* {@link #record(IRender, ValidationConstraint)}, but special
* delegates may override this behavior to provide (in some cases)
* different error messages or more complicated error renderers.
- *
+ *
**/
public void record(ValidatorException ex);
@@ -224,10 +224,10 @@
/**
* Records an error in the current field, or an unassociated error
* if there is no current field.
- *
+ *
* @param message message to display (@see RenderString}
* @param constraint the constraint that was violated, or null if not known
- *
+ *
* @since 1.0.9
**/
@@ -236,10 +236,10 @@
/**
* Records an error in the current component, or an unassociated error.
* The maximum flexibility recorder.
- *
+ *
* @param errorRenderer object that will render the error message (@see RenderString}
* @param constraint the constraint that was violated, or null if not known
- *
+ *
**/
public void record(IRender errorRenderer, ValidationConstraint constraint);
@@ -260,7 +260,7 @@
/**
* Invoked just before the <input> element is closed.
* The delegate can write additional attributes. This is often used
- * to set the CSS class of the field so that it can be displayed
+ * to set the CSS class of the field so that it can be displayed
* differently, if in error (or required).
*
* @since 1.0.5
@@ -308,7 +308,7 @@
/**
* Returns true if any form component has errors.
- *
+ *
**/
public boolean getHasErrors();
1.5 +11 -11 jakarta-tapestry/framework/src/org/apache/tapestry/valid/IValidator.java
Index: IValidator.java
===================================================================
RCS file: /home/cvs/jakarta-tapestry/framework/src/org/apache/tapestry/valid/IValidator.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- IValidator.java 19 Jan 2004 21:32:25 -0000 1.4
+++ IValidator.java 12 Feb 2004 17:05:19 -0000 1.5
@@ -23,13 +23,13 @@
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
- * 4. The names "Apache" and "Apache Software Foundation", "Tapestry"
+ * 4. The names "Apache" and "Apache Software Foundation", "Tapestry"
* must not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache@apache.org.
*
- * 5. Products derived from this software may not be called "Apache"
- * or "Tapestry", nor may "Apache" or "Tapestry" appear in their
+ * 5. Products derived from this software may not be called "Apache"
+ * or "Tapestry", nor may "Apache" or "Tapestry" appear in their
* name, without prior written permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
@@ -75,16 +75,16 @@
/**
* All validators must implement a required property. If true,
* the client must supply a non-null value.
- *
+ *
**/
public boolean isRequired();
/**
- * Invoked during renderring to convert an object value (which may be null)
+ * Invoked during rendering to convert an object value (which may be null)
* to a String. It is acceptible to return null. The string will be the
* VALUE attribute of the HTML text field.
- *
+ *
**/
public String toString(IFormComponent field, Object value);
@@ -92,9 +92,9 @@
/**
* Converts input, submitted by the client, into an object value.
* May return null if the input is null (and the required flag is false).
- *
+ *
* <p>The input string will already have been trimmed. It may be null.
- *
+ *
* @throws ValidatorException if the string cannot be converted into
* an object, or the object is
* not valid (due to other constraints).
@@ -107,9 +107,9 @@
* the tag is closed) to allow the validator to provide a contribution to the
* rendering process. Validators typically generated client-side JavaScript
* to peform validation.
- *
+ *
* @since 2.2
- *
+ *
**/
public void renderValidatorContribution(
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org