|
|
In my opinion it is not a good idea to use the toString() method for
this purpose.
First of all, since toString() is already defined in java.lang.Object
you cannot force developers of error renderers to implement it. And
secondly, the result of toString() is often "vague" and changes over
time, so it is often used for debugging purposes only. I think it is
not a good idea to rely on the output of toString().
How about extending the IRender interface?
interface ErrorRenderer extends IRender {
String getString();
}
interface IValidationDelegate {
...
void record(ErrorRenderer errorRenderer, ValidationConstraint constraint);
...
}
class RenderString implements ErrorRenderer {
...
}
What do you think?
Markus
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: tapestry-dev-help@xxxxxxxxxxxxxxxxxx
|
|