I've called a MAPersonEditor from my WATask, but pressing "Save" in
the editor does not seem to answer to the task. Do I need to override a save message or something? Thanks, Chad _______________________________________________ SmallWiki, Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki _______________________________________________ Smallwiki mailing list [hidden email] http://impara.de/mailman/listinfo/smallwiki |
Nevermind that last message. I was overcomplicating the problem. All
I had to do was change my change one method in my task. (from this) getPerson ^ self call: (MAPersonEditor new) (to this) getPerson ^self call: (MAPersonModel new asComponent addValidatedForm; yourself). A very simple, time-saving solution. Plus, didn't need to use the MAPersonEditor. I can see Magritte being a big help when building a questionnaire or survey application which involves many input forms. Cheers, Chad On 3/6/06, Chad Nantais <[hidden email]> wrote: > I've called a MAPersonEditor from my WATask, but pressing "Save" in > the editor does not seem to answer to the task. Do I need to override > a save message or something? > > Thanks, > > Chad > _______________________________________________ SmallWiki, Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki _______________________________________________ Smallwiki mailing list [hidden email] http://impara.de/mailman/listinfo/smallwiki |
Hi Chad,
welcome to the list and thanks for answering your question ;-) > getPerson > ^self call: (MAPersonModel new asComponent > addValidatedForm; > yourself). Indeed you have to use Seaside decorations to add a validation- handler and a form handler. This allows to customize those two aspects, say if you want multiple Magritte components within one form, different button labels, different button actions, different error handling, etc. > I can see Magritte being a big help when building a questionnaire or > survey application which involves many input forms. Certainly, but there are many more thing you can do: building reports, reflecting about model objects, letting users build their own forms from custom descriptions, ... Letting users customize descriptions can be done like ... model := MAScaffolder description: MAPersonModel description. model asComponent -> an editor onto the model-object model description asComponent -> an editor onto the description (meta-model) Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ SmallWiki, Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki _______________________________________________ Smallwiki mailing list [hidden email] http://impara.de/mailman/listinfo/smallwiki |
In reply to this post by Chad Nantais-2
Chad Nantais a écrit :
> Nevermind that last message. I was overcomplicating the problem. All > I had to do was change my change one method in my task. > > (from this) > getPerson > ^ self call: > (MAPersonEditor new) > > (to this) > getPerson > ^self call: (MAPersonModel new asComponent > addValidatedForm; > yourself). For those who has not understand why the first won't work: In fact, MAPersonEditor is just a demo to see how easily one can describe a model and have the component updated. MAPersonEditor should _not_ be used in another application as it never returns the modified models. -- Damien Cassou _______________________________________________ SmallWiki, Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki _______________________________________________ Smallwiki mailing list [hidden email] http://impara.de/mailman/listinfo/smallwiki |
In reply to this post by Chad Nantais-2
Chad Nantais a écrit :
> Nevermind that last message. I was overcomplicating the problem. All > I had to do was change my change one method in my task. > > (from this) > getPerson > ^ self call: > (MAPersonEditor new) > > (to this) > getPerson > ^self call: (MAPersonModel new asComponent > addValidatedForm; > yourself). For those who has not understand why the first won't work: In fact, MAPersonEditor is just a demo to see how easily one can describe a model and have the component updated. MAPersonEditor should _not_ be used in another application as it never returns the modified models. -- Damien Cassou _______________________________________________ SmallWiki, Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki _______________________________________________ Smallwiki mailing list [hidden email] http://impara.de/mailman/listinfo/smallwiki |
Free forum by Nabble | Edit this page |