Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Synch using Forms (Submit)
Last updated at 11:07 pm UTC on 14 October 2008
If you do not want to synchronize the status of HTML representation on the server immediately, you can use an event handler that updates the widgets when form is submited. The synchronization is made in a complete way, updating all controls in the server, and all of them are redrawn in the client with the response. Here you can't use SASE protocol and the extensions (except SFButton); you should use the event handler protocol #addEventHandler:.
| pane handler |
pane := SFTextField readWrite.
pane 
	value: 'hello';
	name: 'textField';
	size: 40;
	maxLength: 10.
handler := SFDelayedEventHandler on: #changed:.
handler
	send: #textfieldChanged:
		to: self.
pane addEventHandler: handler.


See SFDelayedEventHandler and the example in WASubmitTextFieldExample.

Supported Events