Results 1 to 5 of 5

Thread: How to create master page for mvc application

  1. #1
    Sencha User
    Join Date
    Jan 2014
    Location
    India
    Posts
    110
    Answers
    2

    Default Answered: How to create master page for mvc application

    Hi,
    I have done one controller views calling but now I want to create master page on which i will put links of all controllers views calling purpose just like .net mvc layout page. How can i do this, need a help.



    Ragards,
    Sandy

  2. Hello Sandy,
    If your application requires master page for all the screens/views, just give your viewport a border layout and add the required common regions in that and make your center region to hold all the rest of the views. Just like,

    Ext.Viewport({ layout: 'border', items: [{ region: 'north',
    // add your customization }, { region: 'east',
    // add your customization },{
    region : 'center',
    xtype : 'yourViewsGoesHere'
    }
    ]});* This way is suited only if you need master page for all the views.

  3. #2
    Sencha User palakurthivishal's Avatar
    Join Date
    Jul 2013
    Location
    India
    Posts
    74
    Answers
    8

    Default Customize your Viewport as a MasterPage

    Hello Sandy,
    If your application requires master page for all the screens/views, just give your viewport a border layout and add the required common regions in that and make your center region to hold all the rest of the views. Just like,

    Ext.Viewport({ layout: 'border', items: [{ region: 'north',
    // add your customization }, { region: 'east',
    // add your customization },{
    region : 'center',
    xtype : 'yourViewsGoesHere'
    }
    ]});* This way is suited only if you need master page for all the views.

  4. #3
    Sencha User
    Join Date
    Jan 2014
    Location
    India
    Posts
    110
    Answers
    2

    Default

    okay thanks dude.. is any sample example present on net ???

  5. #4
    Sencha User palakurthivishal's Avatar
    Join Date
    Jul 2013
    Location
    India
    Posts
    74
    Answers
    8

    Default

    No Bro,
    Now that you know how to do it, you design an example so, I'll suggest your example to others..

  6. #5
    Sencha User
    Join Date
    Jan 2014
    Location
    India
    Posts
    110
    Answers
    2

    Default

    Hi palakurthivishal ,
    I have created one viewport with the give help from you. Hope it will help to you

    Ext.define('Dinerware.view.Viewport', {
    renderTo: Ext.getBody(),
    extend: 'Ext.container.Viewport',
    requires: [
    'Ext.window.MessageBox',
    'Ext.data.TreeStore',
    'Ext.tree.Panel',
    'Ext.tab.Panel',
    'Ext.layout.container.Border'
    ],
    id: 'viewport',
    layout: 'border',
    items: [
    {
    region: 'west',
    xtype: 'treepanel',
    title: 'Dinerware',
    itemId: 'main-nav-tree',
    width: 150,
    rootVisible: false,
    root: {
    expanded: true,
    children: [
    {
    text: 'Home',
    leaf: true,
    href: '#'
    },

    {
    text: 'Menu Item Sql',
    leaf: true,
    href:'#MenuItemSql'
    },
    {
    text: 'Ticket Sql',
    leaf: true,
    href:'#TicketSql'
    },
    {
    text: 'Menu Item Raven',
    leaf: true,
    href:'#MenuItemRaven'
    },
    {
    text: 'Ticket Raven',
    leaf: true,
    href:'#TicketRaven'
    }
    ]
    }
    },
    {
    region: 'center',
    xtype: 'tabpanel',
    defaults: {
    closable:true
    },
    items: [
    {
    title: 'Home',
    autoScroll: true,
    closable: false,
    bodyPadding: '20',
    html: [
    '<h1>Dinerware</h1>',
    '<h6>Copyrights @2013 dinerware</h6>'
    ]
    }
    ]
    }
    ]
    });

    Regards,
    Sandy

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •