Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    63
    Vote Rating
    6
    jeffrey.hobson is on a distinguished road

      0  

    Default Ext.navigation.View creates navigation bar when navigationBar config set false

    Ext.navigation.View creates navigation bar when navigationBar config set false


    Hey all, very quick bug hence not using the full format; let me know if you need it or more info.

    I'm using a navigation view to make for easy transitions between a login form and another (main) navigation view (I know I could use a container with a card layout, but I didn't feel like creating push and pop methods or using setActiveItem). In the config for this navigation view I set "navigationBar: false". This works in that it hides the navigation bar from view, but it still creates the component, wasting resources.

    I tried destroying the navigation bar manually (on initialize, on painted, etc.), yet it always came back (or never left in the first place)! The only way I could get rid of it was to set navigationBar to null instead of false, however, this broke the entire navigation view.

    I understand from delving into the source code in the past that the navigation bar is very closely tied into the navigation view (what with the back button stack trace and all), but I think the option should probably be available to use a navigation view without the bar, otherwise we're simply rewriting code if we want push and pop functions.

    For now, I switched to using a Container with a card layout and that's working fine, but it's less convenient.
    Thanks.

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


    I'm not sure why you would use a navigation view without a navigation bar. What's wrong with using a Container with card layout?
    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
    Join Date
    May 2012
    Posts
    63
    Vote Rating
    6
    jeffrey.hobson is on a distinguished road

      0  

    Default


    Quote Originally Posted by mitchellsimoens View Post
    I'm not sure why you would use a navigation view without a navigation bar. What's wrong with using a Container with card layout?
    Nothing is particularly wrong with it, it's just handy to use the push and pop methods of a NavigationView, especially when working with multiple developers. Like I mentioned above, one could rewrite those methods for the container, but since a navigation view is basically a container with those methods and a toolbar, it just seems inefficient.

    Besides, the thing that bothered me more was the inconsistency. If a navigation view requires a navigation bar to work, you should not be able to set its config to false in the first place. It should only accept non-null configurations and simply clarify in the documentation that if you want a navigation view without a toolbar you should use a container with a card layout. It seems silly (and inefficient) to be able to hide the toolbar but not destroy it.

    Idk, just my two cents.

Thread Participants: 1