Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User VDP's Avatar
    Join Date
    Feb 2012
    Location
    Boom, Belgium
    Posts
    82
    Vote Rating
    9
    VDP will become famous soon enough

      0  

    Default TreePanel with "rootVisible: false" not showing anything in Ext 4.2

    TreePanel with "rootVisible: false" not showing anything in Ext 4.2


    REQUIRED INFORMATION

    Ext version tested:
    • Ext 4.2.0
    Browser versions tested against:
    • Chrome Version 25.0.1364.172 m
    Description:
    I can't get the treepanel working in the new Ext 4.2.0 version. Specifically when I don't want the root to be visible. I provide 2 test cases.

    Steps to reproduce the problem:
    • define, create and load an 'Ext.data.TreeStore',
    • create a treepanel with the rootVisible set to false.
    The result that was expected:
    • list of folders (optionally leafs, but not in my test data)
    The result that occurs instead:
    • no list empty, 0 height panel showing.

    Test Case:

    working Ext 4.1.1 example:
    http://jsfiddle.net/Vandeplas/y9WhL/12

    broken Ext 4.2.0 example:
    http://jsfiddle.net/Vandeplas/y9WhL/16/

    HELPFUL INFORMATION

    See this URL for live test case:http://jsfiddle.net/Vandeplas/y9WhL/16/

    Additional CSS used:
    • only default ext-all-debug.css
    Operating System:
    • Windows 7 - 64Bit

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,632
    Vote Rating
    817
    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


    It looks like it's the leaf field that you have in your model.
    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.

  3. #3
    Sencha User VDP's Avatar
    Join Date
    Feb 2012
    Location
    Boom, Belgium
    Posts
    82
    Vote Rating
    9
    VDP will become famous soon enough

      0  

    Default


    Thanks for putting me on the right track!

    The issue was indeed with the converter on the leaf field. Behind the scenes Ext creates a root node if no root node is present. In previous versions the newly created root node wasn't passed through the converter in Ext 4.2 it is past through the converter. In my case I checked if type is 'folder'. But the root field has no type resulting in being a leaf. Resulting in not showing anything. (because the root was hidden)

    working fiddle with logging

    http://jsfiddle.net/Vandeplas/y9WhL/19/



Thread Participants: 1

Tags for this Thread