1 <qx.client.builder.Container>
2 <qx.ui.form.Button id='btn' label='Click Me!!!' location='20,50'>
4 <!-- function body event listener -->
5 <qx.client.builder.EventListener type='click' args='event'>
6 btn.setLabel(btn.getLabel() + ".");
7 alert(event + "\n\nClicked on: " + this.getLabel());
8 </qx.client.builder.EventListener>
11 global object.method delegation
12 when the button is clicked, d.click(event) will be called
14 <qx.client.builder.EventListener type='click' delegate='d.click'/>
17 global function delegation
18 when the button is clicked, f(event) will be called
20 <qx.client.builder.EventListener type='click' delegate='f'/>
23 <qx.ui.basic.Atom id='atom1' label='Test No #1' icon='icon/16/penguin.png' border='qx.renderer.border.Border.presets.black' location='20,90'/>
25 <qx.ui.form.Button label='Test No #2' icon='icon/16/penguin.png' location='20,120'>
26 <qx.client.builder.EventListener type='click'>
27 atom1.setLabel(atom1.getLabel() + ".");
28 </qx.client.builder.EventListener>
31 <qx.ui.basic.Atom label='Test No #3' icon='icon/16/penguin.png' location='20,160'/>
33 <qx.ui.basic.Atom label='a' icon='icon/16/penguin.png' location='20,200'/>
34 <qx.ui.basic.Atom label='b' icon='icon/16/penguin.png' location='20,240'/>
37 <qx.client.builder.Script>
38 // test delegate function
40 alert(e + '\n\nclick received at delegate function\n\n');
43 // test delegate object
47 alert(e + '\n\nclick received at delegate object\n\n' + this.hello);
50 </qx.client.builder.Script>
51 </qx.client.builder.Container>