On Jul 19, 2007, at 6:08 PM, Ramon Leon wrote:
I'm doing the following:
renderContentOn: html
html render: ((self parent person asComponent)
readonly: true;
yourself ).
html form with: [html submitButton callback: [self editClient];
value: 'edit']
To view a model object... everything seems to work fine. When
I toggle halos and try to see source or inspect one of the
Magritte components, it fails, because they aren't being
returned by #children anywhere. Is there a way I can cache
the component, or do this a different way?
Thanks,
Brian
Common mistake, you don't use asComponent on the fly like that.
You need to
stick the result of asComponent into an instance variable, return
it from
children, and then use html render: on the instance variable. Seaside
components are stateful, instance variables stick around between page
requests.
Well, sure - I've known this for years, but with all the Magritte
examples I've seen in the image, caching wasn't being used, mostly
just #call: and #answer:, so I guess I became confused :)
thanks,
Brian
Ramon Leon
http://onsmalltalk.com
_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki