Does the ValidationDelegate need to be cleared explicitly in 2.0.5?
I have a setup where a ValidationDelegate is declared as a bean in a page's
.jwc. The ValidationDelegate is referenced in the page's java code like
this:
public ValidationDelegate getValidationDelegate()
{
if( _validationDelegate == null)
{
_validationDelegate =
(ValidationDelegate)this.getBeans().getBean(VALIDATION_DELEGATE_BEAN_NAME);
}
return _validationDelegate;
}
and then in the form processing method:
ValidationDelegate aValidationDelegate =
this.getValidationDelegate();
IRender anError = aValidationDelegate.getFirstError();
I'm finding that the ValidationDelegate is retaining the error from the
*previous* request cycle, even if the currently submitted form should pass
validation.
If, however, I do this:
public void detach()
{
_validationDelegate.clear();
...
it works as I would expect.
Is this right? Strangely, I didn't have to do this in 1.0.8.
Joseph Panico
[EMAIL PROTECTED]
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer