Results 1 to 8 of 8

Thread: breadcrumbs example does not work

  1. #1
    Sencha User
    Join Date
    Aug 2017
    Posts
    9
    Vote Rating
    0
      0  

    Default breadcrumbs example does not work

    I've got this code from a book:

    Ext.define('Myapp.sample.store.mainMenu', {
    extend: 'Ext.data.TreeStore',
    root: {

    text: 'My app',
    expanded: true,
    children: [{
    text: 'Modules',
    expanded: true,
    children: [
    {leaf: true, text: 'Employees'},
    {leaf: true, text: 'Customers'},
    {leaf: true, text: 'Products'}
    ]
    },{
    text: 'Market',
    expanded: true,
    children: [
    {leaf: true, text: 'Sales'},
    {leaf: true, text: 'Budgets'},
    {leaf: true, text: 'SEO'},
    {leaf: true, text: 'Statistics'}
    ]
    },{
    text: 'Support',
    children: [
    {leaf: true, text: 'Submit a ticket'},
    {leaf: true, text: 'Forum'},
    {leaf: true, text: 'Visit our web site'}
    ]
    },
    {leaf: true, text: 'Reports'},
    {leaf: true, text: 'Charts'}
    ]
    }
    });
    var myMenuStore = Ext.create('Myapp.sample.store.mainMenu',{});
    var myPanel = Ext.create('Ext.panel.Panel',{
    title:'My first breadcrumb bar...',
    width:600,
    height:200,
    margin:50,
    dockedItems:[{ //Step 2
    xtype : 'breadcrumb',
    dock: 'top',
    store: myMenuStore,
    showIcons: true,
    selection: myMenuStore.getRoot().childNodes[0].childNodes[0]
    }],
    renderTo:Ext.getBody()
    });



    But I can't make it works... What's wrong with it?

  2. #2
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,984
    Answers
    506
    Vote Rating
    292
      0  

    Default

    Seems to work for me.
    https://fiddle.sencha.com/#view/editor&fiddle/25t2

    What version of Ext JS are you using?

    Lifecycle management for your web apps

  3. #3
    Sencha User
    Join Date
    Aug 2017
    Posts
    9
    Vote Rating
    0
      0  

    Default

    I use these links:

    <link href="https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-classic/resources/theme-classic-all.css" rel="stylesheet" />
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/ext-all.js"></script>

    I'm testing other code with this method and it looks to don't work as well, is there a simple method to work basely with extjs without creating a complete mvvm app?
    Just a file where creating simple classes like a menu or something like that?
    Last edited by abe001; 30 Aug 2017 at 12:53 PM. Reason: make it complete

  4. #4
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,984
    Answers
    506
    Vote Rating
    292
      0  

    Default

    Here's a version of your code running in 6.0.0. I'm not sure I understand what isn't working for you.

    Lifecycle management for your web apps

  5. #5
    Sencha User
    Join Date
    Aug 2017
    Posts
    9
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by Gary Schlosberg View Post
    Here's a version of your code running in 6.0.0. I'm not sure I understand what isn't working for you.
    I can't find the link...

  6. #6
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,984
    Answers
    506
    Vote Rating
    292
      0  

    Default

    That's because I neglected to post it. Terribly sorry, here it is:
    https://fiddle.sencha.com/#view/editor&fiddle/260s

    Lifecycle management for your web apps

  7. #7
    Sencha User
    Join Date
    Aug 2017
    Posts
    9
    Vote Rating
    0
      0  

    Default

    But... Does it change only in indentation?

  8. #8
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,984
    Answers
    506
    Vote Rating
    292
      0  

    Default

    I'm afraid that I don't understand. What are you looking to achieve?

    Lifecycle management for your web apps

Similar Threads

  1. [FIXED] Breadcrumbs bug in documentation
    By rkuka in forum Ext 5: Bugs
    Replies: 1
    Last Post: 23 Sep 2014, 8:15 AM
  2. BreadCrumbs in ExtJS
    By Ronits in forum Ext: Discussion
    Replies: 3
    Last Post: 20 May 2013, 2:20 AM
  3. Breadcrumbs UI
    By ViralCipher in forum Sencha Touch 1.x: Discussion
    Replies: 5
    Last Post: 28 Aug 2012, 9:15 PM
  4. breadcrumbs header
    By zimazipo in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 18 Jan 2011, 1:18 AM
  5. Creating breadcrumbs in a panel
    By varad in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 12 Jan 2010, 11:00 PM

Posting Permissions

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