var Obj = Ext.getCmp(this.extid+'_main'); self._jswritejava(Obj,'mod','msg'); _jswritejava:function(fromObj,modName,msgName){ var fields = fromObj.getForm().getFields(); var window_name = '_blank'; var xOffset = 100, yOffset = 20; w = window.open("", window_name, 'toolbar=0,location=0, directories=0,' +' status=0, menubar=0, scrollbars=1, resizable=1,copyhistory=0,' +'width=900,height=600,top=' + yOffset +',left='+xOffset+''); for(var i = 0; i < fields.getCount(); i++){ var field = fields.getAt(i); if(field.allowBlank==false){ var name = field.fieldLabel; var valuename = field.name; var tmpStr = valuename.substring(0,1).toUpperCase() + valuename.substring(1,valuename.length); w.document.write('if(null=='+modName+'.get'+tmpStr+'()){'+'<br>'); w.document.write( msgName+'+=\"'+name+',\";'+'<br>'); w.document.write("}<br>"); } } },