[Seaside] Magritte component with your own Form

Hilaire hilaire at drgeo.eu
Wed Feb 4 09:51:00 UTC 2015


How will you use your own form in a Magritte component?

I tried the following:

"From the parent component"

html anchor
   callback: [
      model := CGAddress new.
      answer := self call: (CGComponent editor:model asComponent
         ifNil: [ self inform: 'Abandon de l''édition']
         ifNotNil: [ self inform: 'Edition sauvegardée : ', model city]
   with: 'Editer addresse']

"Then in the child component, I answer: with the editor instance"
renderContentOn: html
   html form: [
      html render: editor .
      html submitButton
         value:  'Sauvegarder';
         callback: [self answer: editor].
      html cancelButton
         value: 'Abandon';
         callback: [ self answer: nil ]

However, when clicking the submit button, I have an error:
Error: Instances of UndefinedObject are not indexable
Your request could not be completed. An exception occurred.

No validation take place either.

Any idea what can be wrong?


Dr. Geo - http://drgeo.eu
iStoa - http://istoa.drgeo.eu

More information about the seaside mailing list