A strange Magritte issue

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

A strange Magritte issue

Brian Brown-2
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



_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: A strange Magritte issue

Lukas Renggli-2
Hi,

please try:

Name: Magritte-All-lr.221
Author: lr
Time: 22 May 2007, 11:35:36 pm
UUID: a347f88c-ee88-4209-be3f-1e618583c236
Ancestors: Magritte-All-lr.220
Dependencies: Magritte-Model-lr.268, Magritte-Tests-lr.114, Magritte-
Seaside-lr.230, Magritte-Morph-lr.38

- removed deep validation of single-/multiple-option descriptions

Cheers,
Lukas


On 22 May 2007, at 19:55, Brian Brown wrote:

> 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
>
>
>
> _______________________________________________
> SmallWiki, Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki

--
Lukas Renggli
http://www.lukas-renggli.ch



_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki