Keith Hodges wrote:
Lukas Renggli wrote:
However
the method #validate is never called on the component. Is this
to be expected?
Yes, that's how it is implemented. I agree that this is a bit strange.
So how come MADateSelectorComponent implements #validate, if no one
calls it?
anyone?
Keith
I uploaded a modification to magritte-seaside in which #save/#apply
calls #doValidate on the MAContainerComponent which collects the errors.
#doValidate validates the memento as before but in addition it calls
#validate on all contained non-readonly components.
This means that #validate is now called on MADateSelector etc. (I could
not see where this was being called before, and your comment above
indicated that it wasnt. MAInternalEditorComponent propagates #validate
to its own container component and its children in turn.
This allows my "enter the text/password twice" component to raise an
exception if the two entry fields do not match.
I also added #valueOriginal to MAElementComponent which allows
validation to compare with the original value. i.e. if the password is
unchanged, dont worry about the second entry field.
Would you have any interest in this dual entry component as an addition
to the base Magritte-Seaside ?
best regards
Keith