Hi -
not sure why I wasn't able to find any of this by googling but the
fact that the Tapestry javadoc shows that the getErrorRenderer()
returns an IRender interface led me astray. After some logging I
noticed it was returning a RenderString which has a getString()
method. So in my writeSuffix() I simply do this:
if (isInError()) {
RenderString errorString = (RenderString)
findCurrentTracking().getErrorRenderer();
writer.print(errorString.getString());
}
works perfectly.
On 4/13/05, Michael Engelhart <[EMAIL PROTECTED]> wrote:
> Hi -
>
> How does one access an error set on a component like this:
> protected void recordError(IValidationDelegate delegate, String
> componentId, String message, ValidationConstraint constraint) {
> IFormComponent component = (IFormComponent) getComponent(componentId);
> delegate.setFormComponent(component);
> delegate.record(message, constraint);
> }
>
> When i call this method from a page like this:
> recordError(delegate, "ExpirationDateField", "You must set a valid
> expiration date", null);
>
> i can't seem to find anywhere in the validation framework where I can
> access a component's error message in the writeSuffix() method of my
> class that extends ValidationDelegate.
>
> Thanks
> Mike
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]