tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Wiederkehr <markus.wiederk...@gmail.com>
Subject Regarding TAPESTRY-258 and 259
Date Tue, 01 Feb 2005 10:27:44 GMT
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@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Mime
View raw message