PDA

View Full Version : TriggerFiled click not working as xtype?



dbassett74
24 May 2010, 7:04 AM
What am I doing wrong here? onTriggerClick is not firing...



{ xtype: 'trigger', itemId: 'SearchTextField', x: 5, y: 5, width: 200,
listeners: {
onTriggerClick: function(e) {
alert("test");
},
scope: this
}
}

fabio.parra
25 May 2010, 3:24 PM
onTriggerClick isnt an event...Its an abstract method that you need to implement:



{
xtype : 'trigger',
itemId : 'SearchTextField',
x : 5,
y : 5,
width : 200,
onTriggerClick : function(e) {
alert("test");
}
}



Provides a convenient wrapper for TextFields that adds a clickable trigger button (looks like a combobox by default). The trigger has no default action, so you must assign a function to implement the trigger click handler by overriding onTriggerClick

dbassett74
31 May 2010, 4:04 PM
Thanks, that was it!