[Seaside] [Magritte] Validation object existence in collection.

Humber Aquino humberaquino at gmail.com
Tue Nov 28 01:13:20 UTC 2006

Hi Seasiders :P  I have a Magritte question. It´s about validating and
managing a collection of described objects.
For example:
I have a Person class with 2 descriptions:
Person class>>descriptionName
 ^ (MAStringDescription auto: 'name' label: 'Name' priority: 10)
Person class>>descriptionAge.
 ^ MANumberDescription auto: 'name' label: 'Name' priority: 10.

When i want a seaside component for editing or creating a Person Object i call
person := self call:(Person new asComponent addValidatedForm; yourself).

Thats pretty standard. he Thing is, all the validations for each
description in this container are validated but only for this object.
Do i have to make my own validations if i want to validate the
existence of this object in a Collection. I know this sound really
dumb but i would like to know if theres a clean way to do this. I want
to use Seaside with Magritte for building and validating my objects
and persist them with magma.
I created a magma repository with a Dictionary as a root. This
dictionary has one entry called people with a OrderedCollection as
it's value.
So, which strategy is the best in this case? Is there a clean way to
do it? Am i missing something? Sorry for the verbosity and thanks

One last thing. In the MAReport class is a method called NOW that says
we shouldn't use that class. I works that bad? I Used it and still now
it's working ok.

More information about the Seaside mailing list