[Seaside] MAInternalEditor values not stored in memento cache

Diego Lont diego.lont at delware.nl
Tue Oct 1 10:25:14 UTC 2013


Hi,

I am not sure. I also had troubles using the MAInternalEditor. I have tackled the problem, using a description flattener. This is part of QC Magritte. After installing QC Magritte:

	> You need to add a method to the office, that says you want to use the builder:
setContainerDefaults: aContainer
	<magritteContainer>
	^aContainer
		componentClass: QCContainerComponent;
		descriptionBuilder: QCDescriptionFlattener;
		yourself

	> and you need to create an empty address as initialization.

Then you can remove the lines of componentClass and reference in the addressDescription, and it should work.

Regards,
Diego


On Oct 1, 2013, at 11:16 AM, Max Bareis wrote:

> 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_______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



More information about the seaside mailing list