[Seaside] jQuery html rendering

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


Oh, I get it. If I render something that doesn't return anything, of course there would be nothing to render.





If I have a class with #renderContentOn: then that would called as part
of the render loop when it is loaded into the document. Is this correct
or am I going crazy? Actually, I just tried that and it doesn't work...



Thanks,

RS

From: watchlala at hotmail.com
To: seaside at lists.squeakfoundation.org
Subject: RE: [Seaside] jQuery html rendering
Date: Sun, 12 Jul 2009 12:18:49 -0600








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?

Thanks,
RS

> 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.
_________________________________________________________________
Lauren found her dream laptop. Find the PC that’s right for you.
http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20090712/9524f4f1/attachment-0001.htm


More information about the seaside mailing list