[Seaside] Cascaded liveUpdates not working?

Martin J. Laubach mjl at laubach.at
Wed Aug 16 11:10:02 UTC 2006

  Should cascaded liveUpdates work or don't they by design? The problem
at hand is the following: I select something from a select box, then
I want some checkboxes to appear. I click on a checkbox and something
should happen immediately.

  However, only the first part reliably works. The second works "sometimes"
when I hit the refresh button on the browser.

  Here's an example of what I want to do:

	currentFruit := nil.
	currentActions := OrderedCollection new.

  LUTest>>renderContentOn: html
	html form: 
		[(html select)
				[:v :h | 
					currentFruit := v.
					self renderFruitOn: h];
			list: #('apple' 'orange' 'banana').
		self renderFruitOn: html].
	self renderActionOn: html

  LUTest>>renderFruitOn: html
	(html div)
		id: 'fruits';
		    [currentFruit ifNotNil: 
			[#('peel' 'eat' 'cook') do: 
				[:c | 
				| act |
				act := c , ' ' , currentFruit.
				(html checkbox)
						[:v :h | 
						currentActions add: act.
						self renderActionOn: h];
				with: act.
				html break]]].

  LUTest>>renderActionOn: html 
	(html div)
		id: 'actions';
		    [currentActions do: 
				[:c | html text: c; break]]

  So this should give me a drop down box with fruits, then a couple
of checkboxes, and as soon as I select a checkbox, it should display
the action.

  Am I doing something completely wrong? Is there a known workaround?


More information about the Seaside mailing list