Magritte component with your own Form

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Magritte component with your own Form

HilaireFernandes
Hello,


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
addValidation).
      answer
         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?

Hilaire

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

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside