On Wed, May 27, 2015 at 7:40 PM, Rogier Schaaf <rogier.schaaf@gmail.com> wrote:
Hi,

I'm trying to get an HTML form working for a model object using Pharo 4 and Seaside 3. 

The model is a simple Address class with 3 instance variables: street, postCode and town. I have added the Magritte description methods like so:

magritteDescriptionPostCode
<magritteDescription>
^ MAStringDescription new
accessor: #postCode;
label: 'Postcode';
priority: 250;
yourself

The form is a subclass of WAComponent. It has the following method:

renderContentOn: html
( Address new asComponent
addValidatedForm: { #save -> 'Save'. #cancel -> 'Cancel' };
yourself ) renderContentOn: html


mmm that code looks wrong. You should never send explicit #renderContentOn:
Instead, you should use #render:

renderContentOn: html
html render: ( Address new asComponent
addValidatedForm: { #save -> 'Save'. #cancel -> 'Cancel' };
yourself ) 

Did it change? 

Cheers, 

 
The form displays in the browser but has no Save / Cancel buttons and the form tags are missing as well.

What am I missing?

Thanks for your help.

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki



--