Peter Veentjer - Anchor Men wrote:
Another improvement:
the Validator should not be so thightly coupled to the FormComponent ( have
found no reason why it should). The Validator should validate a value and not a
FormComponent and should return a collection of errors. This way the components
are better decoupled and the working of the components not so thightly
integrated
I believe it's coupled with FormComponent because of error messages, as
they are set on per form component basis.
-Matej
And you can use the Validator without a FormComponent. I don`t think you should push users of a public framework to some direction. You can give them guidelines how to use the tools, but they should be free to give there own interpretation to the system as long as they obay the general contracts. This makes flexible system where a lot a code reuse can take place.
________________________________
From: [EMAIL PROTECTED] on behalf of Eelco Hillenius
Sent: Mon 18-7-2005 21:38
To: [email protected]
Subject: Re: [Wicket-user] why such a strange design in the AbstractValidator
But the conversion itself is usually part of the validation (in my case
usually the most important in the web layer) and the string is exactly
what you get from the user. I wouldn't like to make too many assumptions
here. It would be trivial however, to create a validator base class that
does the conversion and then passes this converted value to its
extending classes.
Eelco
Peter Veentjer - Anchor Men wrote:
The validators are all based on strings. I would rather have a
validator that accepts arguments of the right type and the string
value`s shouldn`t be transformer more than once..
so:
transform to right type
validate
assign.
------------------------------------------------------------------------
*From:* [EMAIL PROTECTED] on behalf of Eelco
Hillenius
*Sent:* Mon 18-7-2005 21:12
*To:* [email protected]
*Subject:* Re: [Wicket-user] why such a strange design in the
AbstractValidator
I agree that's an improvement. It's less elegant that we have all those
methods carrying the instance of FormComponent now, but it is better to
have validators thread safe by default.
If we're going to change this, it will mean an API break for a lot of
clients, so this will be 1.1 only. And while we're at it, let's see if
we can improve the validation part further. Phil just filed this:
https://sourceforge.net/tracker/?func=detail&atid=684978&aid=1240458&group_id=119783
<https://sourceforge.net/tracker/?func=detail&atid=684978&aid=1240458&group_id=119783>
with which I also agree.
Do other people have votes/ idea's on this?
Eelco
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
<http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click>
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user