1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    4
    Vote Rating
    0
    Praveena Nalajala is on a distinguished road

      0  

    Default Unanswered: List not displaying in a Panel but displayed in a Ext.navigation.View

    Unanswered: List not displaying in a Panel but displayed in a Ext.navigation.View


    Hi Guys,
    I want to display a list in a Panel not in a navigation view. I just want a Panel in that a title bar and a models list. up on clicking the model item I am displaying a picker.
    There is a button on the title bar up on clicking the button I am activating another JS page which contains products list up on clicking on the products list I am displaying Details. My problem is If I take take both category list and Product list as navigation view. It is showing two navigation bars in Product List screen. So I want a Panel in Models list screen and navigation view in product list screen. How can I achieve that.

    Here is my code for Model.js
    Ext.define('Sencha.view.Model',
    {
    extend: 'Ext.navigation.View',
    xtype: 'homeCard',

    requires:
    [
    'Sencha.view.ProductList',
    ],

    config:
    {
    autoDestroy: false,
    title: 'Home',
    iconCls: 'home',
    styleHtmlContent: true,
    scrollable: false,

    navigationBar: false,
    {
    ui: 'dark',

    items:
    [
    {
    xtype: 'button',
    id: 'productButton',
    text: 'Products',
    align: 'right',
    hidden: false,
    hideAnimation: Ext.os.is.Android ? false :
    {
    type: 'fadeOut',
    duration: 200
    },

    showAnimation: Ext.os.is.Android ? false :
    {
    type: 'fadeIn',
    duration: 200
    }


    },
    ]
    },

    items:
    [
    /*{
    xtype: 'titlebar',
    docked: 'top',
    ui: 'light',
    title: 'Category List',
    items: [
    {
    xtype: 'button',
    align: 'right',
    id: 'productButton',
    ui:'dark',
    //docked: 'right',
    text: '2 Products',
    hidden: false,
    hideAnimation: Ext.os.is.Android ? false :
    {
    type: 'fadeOut',
    duration: 200
    },

    showAnimation: Ext.os.is.Android ? false :
    {
    type: 'fadeIn',
    duration: 200
    }
    }
    ]
    },*/
    {
    title: 'Category List',
    xtype: 'list',
    itemTpl: '{title}',
    store: 'MoreCards',
    width: '100%',
    align:'center',
    cls:'categorylist',

    listeners:
    {
    itemtap: function(list, index, item, record)
    {
    if(!this.picker)
    {
    this.picker=Ext.Viewport.add
    (
    {
    xtype: 'picker',
    slots:
    [
    {
    name: 'limited_speed',
    title: 'Speed',

    data:
    [
    {text: 'Laboratory', value: 50},
    {text: 'explosion proof', value: 50},
    {text: 'blood bank', value: 50},
    {text: 'Laboratory', value: 50},
    {text: 'explosion proof', value: 50},
    {text: 'blood bank', value: 50},
    ]
    }
    ]
    }
    );
    }

    this.picker.show();
    }
    }
    }
    ]
    },
    });

    Please any one help me. Thanks in advance.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,522
    Answers
    3447
    Vote Rating
    814
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    The list doesn't know what height to display in a panel. The panel needs to use a layout to manage the list's height.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1

Tags for this Thread