Results 1 to 2 of 2

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

  1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    4
    Vote Rating
    0
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,326
    Answers
    3884
    Vote Rating
    1297
      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 @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    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.

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
  •