Magritte component customization

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

Magritte component customization

Ramiro Diaz Trepat
Hello again,
    I want to use a Magritte Seaside component with a different set of
actions / buttons than the default ( save / cancel )
    Looking through the list, I found that the required thing to do is
to program the extensions to MAContainerComponent, and then build the
component with a call like this:

   (self model descriptionRequiredFields asComponentOn: self model)
        addValidatedForm: #( register cancel )

   What I am not sure about, is what is the proper way to do this extensions.

   Should I subclass MAContainer and override #componentClass to make
it return a subclass of MAContainerComponent (of my application) that
implements the actions I need (like register in the example above) ?

   Has anyone got an example of this sort of action overriding in
Magritte forms?

   Thanks


   r.
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Magritte component customization

Lukas Renggli
>    (self model descriptionRequiredFields asComponentOn: self model)
>         addValidatedForm: #( register cancel )
>
>    What I am not sure about, is what is the proper way to do this extensions.

Class extensions.

>    Should I subclass MAContainer and override #componentClass to make
> it return a subclass of MAContainerComponent (of my application) that
> implements the actions I need (like register in the example above) ?

This is also a possibility. Usually #register/#login does nothing else
than #save anyway, so it is usually not worth the trouble.

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside