Tapestry's new validation framework covers a few of the basic
constraints one might want on a field: not empty, greater than zero,
etc.
However, I often find myself doing additional validation in a
listener method, as part of the processing. For example, I can't
write a generic "Incorrect password" validator; I actually need to
load up the user before I can check the password. There are myriad
other examples.
So I often find myself doing this in listener methods:
getLoginForm().getDelegate().record(
getPasswordField(),
"Incorrect password");
That seems like more work than it should be -- too much object
traversal for such a common task. Is there a simpler way?
Ideally, I'd be able to do this:
getPasswordField().recordError("Incorrect password");
...or something like that.
Anything in the framework I'm missing here? Am I just going about it
all wrong?
Cheers,
Paul
_________________________________________________________________
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]