Hi,
i have a application that is using the Metaform plugin to generate dynamic form fields.
in this application, some fields are displayed when opening a ticket.
(the fields to be displayed are dynamically selected by the user)
everything works, except that i would like to avoid the display of the window when no fields are available... (now a blank window is displayed)
(see attached screencaptures)
i'd like to be able to test something the decide whether or not i perform a .show() or a .hide()
Here's the definition of the window
The function to load/show the window
Location where the function is called
i have a application that is using the Metaform plugin to generate dynamic form fields.
in this application, some fields are displayed when opening a ticket.
(the fields to be displayed are dynamically selected by the user)
everything works, except that i would like to avoid the display of the window when no fields are available... (now a blank window is displayed)
(see attached screencaptures)
i'd like to be able to test something the decide whether or not i perform a .show() or a .hide()
Here's the definition of the window
Code:
var windowTemplate = new Ext.Window( {id:'windowTemplate', x: 800, y: 100, height: 480, width: 400, closeAction: 'hide', closable: false, items: {xtype:'metaform', id: 'IdMeta', autoScroll: true, url:'vvcall.pgm', baseParams:{pgm:'TDTK01R', action:'getForm', machine: machineTemplate } } } );
Code:
var fcmachineTemplate = function(machineTmpl) { machineTemplate=machineTmpl; Ext.getCmp('IdMeta').getForm().baseParams.machine = machineTemplate; Ext.getCmp('IdMeta').getForm().load(); windowTemplate.show(); };
Code:
.... fcmachineTemplate(data.TKCMACH); ...
Comment