[Seaside] Newbie Q: Help with Canvas API Radiobuttons and Ajax

Shawn MacIntyre smacintyre at mac.com
Sun Mar 12 06:59:51 UTC 2006


Hello,

I have been learning Seaside and I am very interested in the new  
rendering API and the integrated Ajax support. However, I have run  
into a point where I am stumped.  I am trying to build a simple yes/ 
no poll as a learning experience. Everything displays fine and when  
don't make a selection I get the result I expect. However I get an  
error when I make a selection. I would appreciate any pointers on  
where I have gone wrong. I am running Squeak 3.8 and the latest  
release of Seaside 2.6.

This is the offending code:
!URVote methodsFor: 'as yet unclassified' stamp: 'sdm 3/11/2006 23:40'!
renderContentOn: html
	html div class: 'vote'; with: [
		html heading: 'Today''s Vote' level: 2.
		html paragraph class: 'question'; with: 'Are you happy?'.

		html div id: 'vote'.
		html radioGroup: [:group |
			html radioButton
				group: group;
				id: 'yesVote';
				with: 'Yes';
				callback: [ self yesVote ].
			html break.
			html radioButton
				group: group;
				id: 'noVote';
				with: 'No';
				callback: [ self noVote ].
			html break].

		html button value: 'Vote';
			onClick: (html ajax
				id: 'vote';
				triggerCallbackFor: 'yesVote';
				triggerCallbackFor: 'noVote';
				on: #renderVotesOn: of: self)]
! !

This is the trace back displayed in the browser:
Error: key not found

Dictionary(Object)>>error:
self
a Dictionary('1'->a WADispatchCallback '2'->a WAValueCallback '3'->a  
WAValueCallback '4'->a WAAction...etc...
temps
aString
'key not found'
inst vars
tally
9
array
#('3'->a WAValueCallback '8'->a WAActionCallback '1'->a  
WADispatchCallback '6'->a WAActionCallback n...etc...
Dictionary>>errorKeyNotFound
self
a Dictionary('1'->a WADispatchCallback '2'->a WAValueCallback '3'->a  
WAValueCallback '4'->a WAAction...etc...
temps
inst vars
tally
9
array
#('3'->a WAValueCallback '8'->a WAActionCallback '1'->a  
WADispatchCallback '6'->a WAActionCallback n...etc...
[] in Dictionary>>at: {[self errorKeyNotFound]}
self
a Dictionary('1'->a WADispatchCallback '2'->a WAValueCallback '3'->a  
WAValueCallback '4'->a WAAction...etc...
temps
key
'on'
inst vars
tally
9
array
#('3'->a WAValueCallback '8'->a WAActionCallback '1'->a  
WADispatchCallback '6'->a WAActionCallback n...etc...
Dictionary>>at:ifAbsent:
self
a Dictionary('1'->a WADispatchCallback '2'->a WAValueCallback '3'->a  
WAValueCallback '4'->a WAAction...etc...
temps
key
'on'
aBlock
[] in Dictionary>>at: {[self errorKeyNotFound]}
assoc
nil
inst vars
tally
9
array
#('3'->a WAValueCallback '8'->a WAActionCallback '1'->a  
WADispatchCallback '6'->a WAActionCallback n...etc...
Dictionary>>at:
self
a Dictionary('1'->a WADispatchCallback '2'->a WAValueCallback '3'->a  
WAValueCallback '4'->a WAAction...etc...
temps
key
'on'
inst vars
tally
9
array
#('3'->a WAValueCallback '8'->a WAActionCallback '1'->a  
WADispatchCallback '6'->a WAActionCallback n...etc...

Thank you for your help,
Shawn




--
Shawn MacIntyre
Edmonton, Alberta, Canada


-------------- next part --------------
Skipped content of type multipart/mixed


More information about the Seaside mailing list