Hello,
I have a model class called ALServiceContact that is using Magritte,
like I am with my other model classes. This class has 6 descriptions
(string, memo, 3 single options, and a date). Two of the
MASingleDescription descriptions use a list of other model objects as
their options. One points to a list of providers and one to a list of
customers.
The Magritte form builds (asValidatedForm) and displays as I expect,
but when I try to save it, Magritte is giving me validation messages
for descriptions from a different class.
The class I am getting the validation messages from is called
ALCustomer, and is only involved with ALServiceContact through:
ALServiceContact class>>descriptionClient
^ (MASingleOptionDescription new)
selectorAccessor: #client;
label: 'Client';
priority: 20;
options: ALStorage rootOrg customers;
reference: ALCustomer description;
comment: 'A Customer';
yourself
on the ALCustomer class, I have required fields for four
descriptions, and these are the messages I get:
Status: Invalid input given
Title: Input is required but no input given
Organization: Invalid input given
Email: Input is required but no input given
...when I try to save an ALServiceContact created with:
add
|contact|
contact := self call: (ALServiceContact new asComponent
addValidatedForm; yourself).
contact isNil
ifFalse: [
self contactManager addContact: contact.
self report refresh]
Of course, ALServiceContact doesn't even have those descriptions.
Very Strange stuff!
Any thoughts?
Brian