Bruno Borges wrote:
What if we want to have in one IValidator, more than one IBehavior? just
wondering... :)
This could be important and usefull, if in one Validator two _very simple_
behaviors are needed, and they need to be keep separated with each other.
[]'s
We could have a method that adds behaviours, rather than provides them.
Instead of:
public IBehavior newValidationBehavior(Component component)
Have:
public void addBehavior(Component component)
At that point, I'm wondering if there's any point calling it
addBehavior() - surely we should just have a much more generic hook
instead, where you can add IBehaviors, or do anything else you want?
Something like:
public void onAdd(Component component)
So Component#add(IValidator validator) calls validator.onAdd(this);
What do you think?
Al