[Seaside] [Mewa] Can't format multipleRelationshipAttribute (again)

German Arduino gsa at softhome.net
Mon Nov 15 12:04:10 CET 2004


Hi Adrian, All:

I've migrated my Mewa-Seaside app to newest Seaside version (2.5) and 
I'm running again in the problem that you solved in Seaside 2.3

I attach the mails of that time:

-------------------------------------------------------------------

Hi Germán

Thanks - I've fixed the formatting of multiple releationships in the editor.
You can find the new version on SqueakMap.

-------------------------------------------------------------------

Hi:

I'm developing an app using Mewa, and must to relate an item with many
others that I must recover form a collection instvar of the model.

Something like this, of MWPerson Example:

metaobject
   multipleRelationshipAttribute: #interests
   do: [:attribute | attribute label: 'Interests';

     relationshipTo: [self class interests];

     addValidationRule: [:collection | collection size > 1]
     errorString: 'Select at least two interest items'].

But i'm using

     relationshipTo: [MySession currentSession domainmodel interests]
     formatWith: [:each | each interestName, ' (' , each interestType , 
')'];

In my case "interests" is a collection instvar from the model (not from the
class, as in the MWPerson example).

Inspecting model allinstances I can see that all is correct, but the
rendered data only show "aInterest" instead interestName (interestType).

Also, I must add a validationRule (that check at least one interest
selected), that dont't works neither.

Any help will be appreciated.

Regards.

gsa.
-------------------------------------------------------------------

I've installed the latest versions of Seaside and Mewa.

Any help will be appreciated.

Regards.

gsa.



More information about the Seaside mailing list