[Seaside] [Mewa] Can't format multipleRelationshipAttribute

Germán S. Arduino gsa at softhome.net
Sat Apr 24 22:40:40 CEST 2004


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.







More information about the Seaside mailing list