-
27 Apr 2012 12:19 PM #1
Cannot find triggerClick event on Trigger field
Cannot find triggerClick event on Trigger field
I am using sencha architect, I added a trigger field but I cannot find the click event so that I can do something when some one clicks on the lookup.
-
27 Apr 2012 5:44 PM #2
You are right. Since its not a standard function this was overlooked.
You can add a basic function (call it onTriggerClick) to the TriggerField. Or you can add a custom property - type 'onTriggerClick: function() {}' in the search field and click Add. Then you can click on + sign in the custom field row to define the function.Bharat Nagwani
Sencha Designer Development Team
-
27 Apr 2012 6:54 PM #3
onTriggerClick (as Bharat said):
In init() method of your controller add this (after generated code):Code:var me = this; if (!me.hideTrigger) { me.fireEvent("triggerclick", me, event); }
Replace the component query with your own.Code:// Non custom events... this.control({ "mywindow #mytrigger": { "triggerclick": this.triggerTest } });
triggerTest:
Regards.Code:triggerTest: function(e) { alert("works !"); }UI: Sencha Architect 2.x / ExtJS 4 MVC
Server side: EJB 3.1 / CDI / JPA 2 / JAX-RS / JasperReports
Application Server: Glassfish 3.1.x
Databases: Oracle 10g & 11g / DB2 9 & 10 / Firebird 2.5
If you like my answer please vote!


Reply With Quote