[Seaside] MAInternalEditor values not stored in memento cache

Max Bareis info at derverkoster.de
Tue Oct 1 09:16:40 UTC 2013


Hi,

I have an Object Office with instVars and Magrittedescriptions for name and address, where address is a MAToOneReleationship to the Object address with inst vars street, city and country. The description of address in Office is:
addressDescription
	<magritteDescription>
	^ MAToOneRelationDescription new
		accessor: #address;
		componentClass: MAInternalEditorComponent;
		classes: (Array with: CWDBAddress);
		beDescribedByReference ;
		reference:(CWDBAddress new magritteDescription copy kind: CWDBAddress);
		label: 'Adresse';
		priority: 200;
		yourself

The creation of the form is done in my own Component:
officeComponent

	object  ifNil: [ self object: Office new ].
	^ officeComponent ifNil: [ 
		officeComponent := object asComponent 
			addValidatedForm: { ([:c| self save:c] -> 'Aktualisieren')};
		yourself]

I have added a breakpoint to OfficeComponent>>save:
Unfortunately the memento cache in the Component delivered to :c contains the new value for Office>>name but not the changed values for Office>>address.

Is this a misunderstanding of the concept behind MAInternalEditor? How can I assure, that the values of MAInternalEditor are stored in the Component>>memento>>cache?

Regards

Max


More information about the seaside mailing list