Templates y Temas para ExtJS y Sencha Touch Bleext!
Bleextop! un desktop OpenSource para Ext4 y CodeIgniter http://bit.ly/pUwLJO
Llamar un panel desde un formulario
  • Estimados,

    necesito que desde un boton que esta en un panel, me llame otro panel.
    Se puede?
    Como?

    aqui esta el JS que tiene los dos panel
    si esto lo ejecuto me abre un panel y debajo del otro me abre el segundo


    Ext.Loader.setConfig({
    enabled: true
    });

    Ext.application({
    name: 'MyApp',

    launch: function() {
    Ext.QuickTips.init();

    var cmp1 = Ext.create('MyApp.view.appOTM', {
    renderTo: Ext.getBody()
    });
    cmp1.show();
    var cmp2 = Ext.create('MyApp.view.panelMantencionOT', {
    renderTo: Ext.getBody()
    });
    cmp2.show()
    }
    });



    Primer PANEL (Menu principal)
    en el primer boton necesito que llame al otro PANEL


    Ext.define('MyApp.view.ui.panelMenuPrin', {
    extend: 'Ext.panel.Panel',

    height: 573,
    width: 841,
    title: 'Menu Principal / OT-Manager',

    initComponent: function() {
    var me = this;

    Ext.applyIf(me, {
    dockedItems: [
    {
    xtype: 'toolbar',
    dock: 'top',
    items: [
    {
    xtype: 'button',
    width: 125,
    autoWidth: true,
    icon: 'manot.ico',
    iconAlign: 'right',
    scale: 'medium',
    text: 'Mantencion OT',
    tooltip: 'Permite Crear/Modificar/elimina o Listar Las Ordenes de Trabajo (OT)',
    },
    {
    xtype: 'button',
    text: 'MyButton'
    },
    {
    xtype: 'button',
    text: 'MyButton'
    }
    ]
    },
    {
    xtype: 'toolbar',
    dock: 'bottom',
    items: [
    {
    xtype: 'button',
    text: 'Bara de Estado'
    }
    ]
    }
    ]
    });

    me.callParent(arguments);
    }
    });



    Segundo PANEL





    Ext.define('MyApp.view.ui.panelMantencionOT', {
    extend: 'Ext.panel.Panel',

    height: 484,
    width: 841,
    layout: {
    type: 'column'
    },
    closable: true,
    collapseDirection: 'bottom',
    collapsible: true,
    hideCollapseTool: true,
    title: 'Mantencion de Ordenes de Trabajos',
    titleCollapse: true,

    initComponent: function() {
    var me = this;

    Ext.applyIf(me, {
    items: [
    {
    xtype: 'gridpanel',
    height: 457,
    width: 241,
    title: 'Listado de Ordenes de Trabajo',
    columns: [
    {
    xtype: 'gridcolumn',
    dataIndex: 'string',
    text: 'String'
    },
    {
    xtype: 'numbercolumn',
    dataIndex: 'number',
    text: 'Number'
    },
    {
    xtype: 'datecolumn',
    dataIndex: 'date',
    text: 'Date'
    },
    {
    xtype: 'booleancolumn',
    dataIndex: 'bool',
    text: 'Boolean'
    }
    ],
    viewConfig: {

    }
    },
    {
    xtype: 'panel',
    height: 457,
    width: 595,
    title: 'Datos de OT',
    items: [
    {
    xtype: 'form',
    frame: true,
    height: 232,
    padding: '',
    styleHtmlContent: true,
    bodyPadding: 10,
    title: 'Cabecera'
    },
    {
    xtype: 'gridpanel',
    frame: true,
    height: 198,
    width: 618,
    title: 'Detalle',
    columns: [
    {
    xtype: 'gridcolumn',
    dataIndex: 'string',
    text: 'String'
    },
    {
    xtype: 'numbercolumn',
    dataIndex: 'number',
    text: 'Number'
    },
    {
    xtype: 'datecolumn',
    dataIndex: 'date',
    text: 'Date'
    },
    {
    xtype: 'booleancolumn',
    dataIndex: 'bool',
    text: 'Boolean'
    }
    ],
    viewConfig: {

    }
    }
    ]
    }
    ]
    });

    me.callParent(arguments);
    }
    });




    de ante meno , gracias a los que pudiesen ayudarme.

    Saludos, atte.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Login with Facebook Sign In with Twitter

Sign In Apply for Membership

Poll

No poll attached to this discussion.

Tagged