21 Aug 18:55
Using one Magritte form for two model objects
From: Matthias Berth <matthias.berth <at> googlemail.com>
Subject: Using one Magritte form for two model objects
Newsgroups: gmane.comp.lang.smalltalk.smallwiki
Date: 2008-08-21 16:57:02 GMT
Subject: Using one Magritte form for two model objects
Newsgroups: gmane.comp.lang.smalltalk.smallwiki
Date: 2008-08-21 16:57:02 GMT
Hi,
I have a big data model that I have split into around 10 model
classes, each with its own set of Magritte descriptions. Now I'd like
to put several of them into a single Magritte form. In other words, I
want to have the form fields of model 1 and model 2 on the same page,
but only one OK and one Cancel button. What would be the simplest way
to do that?
I found this snippet for re-arranging fields / descriptions [1]:
buildComponentFor: aModel
^((ModelClass descriptionFieldOne, ModelClass descriptionFieldTwo,
ModelClass descriptionFieldThree)
componentRenderer: MACssRenderer;
asComponentOn: aModel)
addValidatedForm;
yourself
but it is using a single model object.
Thanks in advance
Matthias
[1] http://onsmalltalk.com/programming/smalltalk/using-magritte-with-seaside/
_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
(Continue reading)
RSS Feed