Showing an alert when a textField is left blank after clicking ok of dialog box, Listener attached to the dialog :
Code in listeners (Javascript) :
function(dialog) {
var textfieldArray = dialog.findByType("textfield");
var data = textfieldArray[0].getValue();
if(data == "")
{
var property= this.find("name","./title")[0];
property.allowBlank=false;
alert("The field is empty");
alertDialog.show();
}
}
No comments:
Post a Comment