[Seaside] jQuery html rendering

Robert Sirois watchlala at hotmail.com
Sun Jul 12 18:18:49 UTC 2009

Thanks, Julian. I am a bit confused, though.

    html anchor
        onClick: ((html jQuery: '#contentArea') html: [:r | r render: (RPSSCreator new)]);
        with: 'Create a new survey'.

I have been using code like this in a few areas, and it works just fine. The object just needs to persist until it does its job, then I can move along in whatever process.

I can't seem to get some of my components to render in this way... I get: 'MessageNotUnderstood: RPSSSurveyItemComponent>>nil'. As far as I can tell, there is nothing different about it (than the others), and I am not sending any messages to it except #new. WACounter, etc. work fine in its place.

As far as #children goes, I havn't been including everything there because the page is remaining relatively static. 'RPSSSurveyItemComponent' is a WAComponent subclass, but I'm just using it to generate survey components, so for each new survey item I will need a new instance.

Is lazy initializing good enough for creating these objects in advance when it comes to jQuery?


> Date: Sun, 12 Jul 2009 08:22:03 +0100
> Subject: Re: [Seaside] jQuery html rendering
> From: jfitzell at gmail.com
> To: seaside at lists.squeakfoundation.org
> Components are persistent objects. You can't create them on the fly as
> throw-aways (in particular they need to be returned from your
> #children method). See the recent discussion about components,
> painters, and renderable objects on this list.
> You either need to create the component earlier and store it somewhere
> or not use a component here (if you don't need the object to persist,
> you don't need a component).
> Julian
> On Sun, Jul 12, 2009 at 12:25 AM, Robert Sirois<watchlala at hotmail.com> wrote:
> > clickFunctionNew: html
> >         ^((html jQuery: '#newArea') html: [:r | r render:
> > ((RPSSSurveyItemComponent new) newInputOn: self inputType; yourself)]).
> >
> > Could someone please explain to me why this does not work? If I replace the
> > class 'RPSSSurveyItemComponent' with some like a string 'blah', it runs
> > fine. Am I to understand that I cannot render components (the aforementioned
> > class is a WAComponent subclass with the proper 'renderContentOn:' method)
> > like a can do with standard Seaside callbacks?
> >
> > Thanks!
> >
> > RS
> >
> > ________________________________
> > Windows Live™: Keep your life in sync. Check it out.
> > _______________________________________________
> > seaside mailing list
> > seaside at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >
> >
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

Lauren found her dream laptop. Find the PC that’s right for you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20090712/022b63c3/attachment.htm

More information about the seaside mailing list