Hello German,
Hi:On the class side of MAToOneRelationDescription the defaultComponentClasses method returns an array with two component classes: MAExternalEditorComponent and MAInternalEditorComponent. By default, the first of these is what you are seeing rendered. To override this behavior you have to send componentClass: to your description. Magritte does not come with a select list component for the MAToOneRelationDescription but it is easy to create one descended from MAOneToOneComponent that will render a select list of all the instances of the classes declared in the classes: message sent to the description. So your descriptionSupplier method might look like:
I'm a bit confused using relationships between objects in Magritte.
Let's start with MAToOneRelationDescription.
I've a Contracts system were each contract have 1:1 Relation with
Suppliers (another collection of the system), then on the form
to add contracts, on the place of Supplier I wants to show a combo
with, for example, all the suppliers names loaded on the
suppliers collection, to select one to use in the current contract.
Very common need I think (Is the way I used to do with Mewa).
But trying with different options (not found much doc about each
possible method to use on MAToOneRelationDescription) I get
a "create" button than, certainly, is not what I need and really not
understand the fundamentals of this button on a single 1:1
relationship.
Any clarification about this topic, examples, documentation, etc will
be greatly appreciated.
BTW, I'm using Seaside 3.0 with installed on Pharo rc2 with the
Configuration provided by Dale.
Cheers.
--
=================================================
Germán S. Arduino <gsa @ arsol.net> Twitter: garduino
Arduino Software & Web Hosting http://www.arduinosoftware.com
PasswordsPro http://www.passwordspro.com
=================================================
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki