PDA

View Full Version : Binding fields in MessageBox



pgarlaud
24 Feb 2015, 2:42 AM
I'm trying to bind the texts of a confirm box, like this:



Ext.MessageBox.show({
bind: {
title: '{title}',
msg: '{message}'
},
buttons: Ext.MessageBox.OKCANCEL,
icon: Ext.MessageBox.WARNING,
scope: this,
fn: function(btn) {
if(btn == 'ok') {
// myFunction();
} else {
return;
}
}
});

But passing binding like this doesn't work.

Any ideas?

greg.barry
26 Feb 2015, 1:08 PM
I don't think you'll be able to do that exactly because the show method doesn't contain binding configurations. That said, you can certainly bind your values on an Ext.window.MessageBox.

Here's an example:
https://fiddle.sencha.com/#fiddle/isf

Thanks!
Greg