1. #1
    Sencha User
    Join Date
    Aug 2011
    Posts
    36
    Vote Rating
    0
    ikim is on a distinguished road

      0  

    Default How to load new view

    How to load new view


    What is the proper way to load another view (e.g. after clicking on a button). I have Ext.Viewport.setActiveItem(Ext.create('MyApp.view.ui.Preferences')); which loads my view but none of the javascript works. When clicking on buttons they do not react to tap/release events, the select field onchange events are not triggered, etc.

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


    That should work as long as it's not before the launch method on Ext.application/Ext.setup fires.
    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
    Aug 2011
    Posts
    36
    Vote Rating
    0
    ikim is on a distinguished road

      0  

    Default


    It does not seem to work. When I switch the "non working view" to the initial view everything works as expected. I am also using Designer 2, not sure if that has any effect?

  4. #4
    Sencha User
    Join Date
    Aug 2011
    Posts
    36
    Vote Rating
    0
    ikim is on a distinguished road

      0  

    Default


    Is there something else that should be called after calling Ext.create on the class? I was able to make the 2 container views work by putting them into a generic nav container with card layout and linking the 2 views into it. However in one of my views I am creating a panel popup using Ext.create and the listeners are unresponsive. If I add this panel to the generic nav container the buttons work but it is overlayed on my initial screen and I only want it to appear at a specific time.

  5. #5
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,882
    Vote Rating
    101
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Create the view, add it to the viewport and then set it to active via its itemId or index in the items collection.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  6. #6
    Sencha User
    Join Date
    Aug 2011
    Posts
    36
    Vote Rating
    0
    ikim is on a distinguished road

      0  

    Default


    Thanks Aaron. The add step seems to be the step I was missing from above. Ext.Viewport.add then Ext Viewport.setActiveItem

  7. #7
    Sencha User
    Join Date
    Aug 2011
    Posts
    36
    Vote Rating
    0
    ikim is on a distinguished road

      0  

    Default


    The app is doing what I want however I keep getting the error

    • [COLOR=red !important]25192Uncaught Error: [ERROR][Ext.Container#setActiveItem] Setting activeItem to be a non-inner item[/COLOR]



    Should I be concerned?

  8. #8
    Sencha User
    Join Date
    Aug 2011
    Posts
    36
    Vote Rating
    0
    ikim is on a distinguished road

      0  

    Default


    Another reason I found for the events not firing is having a value in the "id" field. Normally I don't need this but it's making it difficult to CSS style very specific screens. Should I be able to have an "id" value for the top level containers?

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar