ktoole
03-05-2010, 08:52 AM
I have Ext.form.Field.prototype.msgTarget = 'under'; specified at the top of my program. This makes error messages display under the field when set back with this code:
var errorStore = new Ext.data.JsonStore({
root : 'ERRORS',
fields : ['FIELD','ERRORMSG'],
listeners : {
load: function(){
this.each(function(rec){
Ext.getCmp(rec.data.FIELD).markInvalid(rec.data.ER RORMSG);
})
}
}
})
This works great, except that the size of the form panel window changes when the errors are display and the bottom buttons can move off the visible screen. I tried to use Ext.form.Field.prototype.msgTarget = 'side';, but it will not display the error text when you hover over the field or the error icon. It does display that there is an error on the field, but no error text. Is there some way to get the error text to appear when hovering on the field or on the error icon with the markInvalid function? I guess I could also move the cancel and save buttons to the tbar, but I am thinking of a future program that might have lots of fields that could have errors and there might be enough error text to run off the screen.
var errorStore = new Ext.data.JsonStore({
root : 'ERRORS',
fields : ['FIELD','ERRORMSG'],
listeners : {
load: function(){
this.each(function(rec){
Ext.getCmp(rec.data.FIELD).markInvalid(rec.data.ER RORMSG);
})
}
}
})
This works great, except that the size of the form panel window changes when the errors are display and the bottom buttons can move off the visible screen. I tried to use Ext.form.Field.prototype.msgTarget = 'side';, but it will not display the error text when you hover over the field or the error icon. It does display that there is an error on the field, but no error text. Is there some way to get the error text to appear when hovering on the field or on the error icon with the markInvalid function? I guess I could also move the cancel and save buttons to the tbar, but I am thinking of a future program that might have lots of fields that could have errors and there might be enough error text to run off the screen.