[Seaside] Nested div rendering question

Brian Brown rbb at techgame.net
Fri Oct 5 04:10:10 UTC 2007

First of all, thank you very much for the detailed reply and taking  
time to look at this.

> Two quick suggestions, one, like Lukas said, fire up firebug.  More
> specifically, after ensuring there aren't any errors of any kind,  
> under the
> Net tab select XHR and look at the individual xml http responses  
> coming
> across and make sure they're both actually rendering the same  
> JavaScript.
> You assume they are, but are they really?  I rigged up a quick  
> sample and
> see the following...

I fired up Firebug and find no errors, so now I'm starting to compare  
the Javascript...

> renderContentOn: html
> 	(html div) id: #test1; with: [self renderRandomOn: html].
> 	(html div) id: #test2; with: [self renderRandomOn: html].
> 	(html button)
> 		onClick: ((html evaluator)
> 					callback: [:v | ] value: 'Dude';
> 					callback: [:s |
> 							(s element) id:
> #test1; render: [:r | self renderRandomOn: r].
> 							(s element) id:
> #test2; render: [:r | self renderRandomOn: r]];
> 					return: false);
> 		with: 'test'
> renderRandomOn: html
> 	(html div) style: 'border:1px solid red;';
> 		with: [html text: 1000 atRandom asString.
> 			self renderRandomAgainOn: html]
> renderRandomAgainOn: html
> 	(html div) style: 'border:1px solid blue;'; with: 1000 atRandom
> asString
> Looks to me like what you're doing in your renderActionButtonsOn  
> and I'm
> rendering two nested divs, but it works for me and the inner divs are
> updated fine.  Looking at the actual response for the xml http  
> request in
> firebug I see this JavaScript rendered when I click the button...
> $('test1').update('<div style="border:1px solid red;">715<div
> style="border:1px solid blue;">666</div></div>');
> $('test2').update('<div style="border:1px solid red;">151<div
> style="border:1px solid blue;">244</div></div>')
> Which is what I'd expect, both inner divs are updated.  BTW, nice  
> looking
> app, especially if you've gotten so far without Firebug.  Could be  
> something
> possibly screwy in your image or a bug.  I'd try to simplify the  
> problem
> down to a fileout you can directly share, it's really hard trying  
> to figure
> this stuff out without all of the code in a runnable form.

Thanks for the compliment on the site. If I can't figure this out,  
I'll do a mock up... which will probably work :)

- Brian

> Ramon Leon
> http://onsmalltalk.com
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

More information about the seaside mailing list