[Seaside] liveCallBack and spanNamed bug

Florian Minjat florian.minjat at emn.fr
Mon Jan 30 15:21:40 CET 2006


Hi,
   I am running Squeak3.8g-6548 with DynamicBindings (1.2), 
KomServices (1.1.2), KomHttpServer (7.0.3) and Seaside (2.5).
   I have strange behavior with liveCallBack and multi spanNamed. When 
I put several spanNamed:with: in a LiveCallBack, the first one works 
fine, modifying the existing span, but the second one is written 
immediatly after the first one, instead of modifying the existing one 
(and there are two span with the same Id).
   There is an exemple in attachement.
   Any idea why the second spanNamed replacement is not working ?
   Thanks in advance,

Florian
-------------- next part --------------
'From Squeak3.8gamma of ''24 November 2004'' [latest update: #6548] on 30 January 2006 at 3:21:21 pm'!
WAComponent subclass: #WATestLive
	instanceVariableNames: 'selected'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'FoilFoil'!

!WATestLive methodsFor: 'as yet unclassified' stamp: 'FM 1/30/2006 15:03'!
initialize
	self session registerObjectForBacktracking: self.! !

!WATestLive methodsFor: 'as yet unclassified' stamp: 'FM 1/30/2006 15:17'!
renderContentOn: html
	| selectList |

	selectList := OrderedCollection newFrom: { 1 . 2 . 3 . 4 . 5 }.
	selected ifNil: [selected := selectList at: 1].

	self renderOne: html.
	html selectFromList: selectList
			selected: selected
			callback: [:i | selected := i]
			labels: [:i | i asString]
			liveCallback: [:i :h | 
				selected := i. 
				self renderOne: h.				
				self renderTwo: h.
			].
	html break.
	self renderTwo: html! !

!WATestLive methodsFor: 'as yet unclassified' stamp: 'FM 1/30/2006 15:06'!
renderOne: html

	html spanNamed: 'One' with: [ html text: 'One :', selected asString; break. ]! !

!WATestLive methodsFor: 'as yet unclassified' stamp: 'FM 1/30/2006 15:16'!
renderTwo: html

	html spanNamed: 'Two' with: [ html text: 'Two :', (selected * 10) asString; break ]! !

"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!

WATestLive class
	instanceVariableNames: ''!

!WATestLive class methodsFor: 'as yet unclassified' stamp: 'FM 1/30/2006 15:03'!
canBeRoot
	^ true! !

!WATestLive class methodsFor: 'as yet unclassified' stamp: 'FM 1/30/2006 15:03'!
initialize
	(self registerAsApplication: 'testLive')
! !


WATestLive initialize!


More information about the Seaside mailing list