[Seaside] spanNamed + liveCallback = bug on accentuation

Florian Minjat florian.minjat at emn.fr
Mon Mar 20 14:35:10 UTC 2006


Hi,
   I had this strange bug for a long time, but I was unable to isolate 
it and make a simple test. Here is the test :).
   I'am using seaside with french text. So I changed 
WAResponse>>initialize to use ISO-8859-1 charset so seaside diplays 
the accents properly. But strange behaviors happens when I use a 
spanNamed and a liveCallback in the same render. Usually the 
accentuated chars are displayed with a ?, but sometimes the text of 
the span itself changes and becomes the same as another span in the page.
   In the attached test, when you select something in the select, the 
'Détruire la pièce' becomes a 'D�truire la pi�ce'.
   I hope this will help make seaside even better :).

Florian
-------------- next part --------------
'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 20 March 2006 at 3:24:15 pm'!
WAComponent subclass: #WATestLiveSelect
	instanceVariableNames: 'confirmRoomDeletion room'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'FoilFoil'!

!WATestLiveSelect methodsFor: 'as yet unclassified' stamp: 'FM 2/16/2006 13:01'!
initialize
	self session registerObjectForBacktracking: self.! !

!WATestLiveSelect methodsFor: 'as yet unclassified' stamp: 'FM 3/20/2006 15:24'!
renderContentOn: html
	| rooms |
	
	rooms :=  { 1 . 2 . 3 . 4 . 5 }.
	room ifNil: [ room := rooms at: 1 ].

	html form: [
		html spanNamed: 'test' with: [ html text: 'Détruire la pièce'; space].
		html selectFromList: (1 to: (rooms size))
			selected: room
			callback: [:i | room := i]
			labels: [:i | i displayString]
			liveCallback: [:i :h | confirmRoomDeletion = false. self renderContentOn: h].
		html break.
		html submitButtonWithAction: [ confirmRoomDeletion := true. ] text: 'Ok'.
	]! !

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

WATestLiveSelect class
	instanceVariableNames: ''!

!WATestLiveSelect class methodsFor: 'as yet unclassified' stamp: 'FM 2/16/2006 13:01'!
canBeRoot
	^ true! !

!WATestLiveSelect class methodsFor: 'as yet unclassified' stamp: 'FM 2/16/2006 13:01'!
initialize
	(self registerAsApplication: 'testLiveSelect')
! !


WATestLiveSelect initialize!


More information about the Seaside mailing list