Hybrid View

  1. #1
    Sencha User
    Join Date
    Nov 2012
    Posts
    4
    Vote Rating
    0
    tres3tre is on a distinguished road

      0  

    Default Need help on the setup of a button click event to go to a new screen or view?

    Need help on the setup of a button click event to go to a new screen or view?


    I dont know how to setup the event in my controller to view a new screen or view with on button tap. If someone could help me give me a run down dummy style because i am pretty lost. Thank you so much i really want to learn.

  2. #2
    Sencha Premium Member
    Join Date
    Nov 2007
    Location
    Moore, Oklahoma
    Posts
    464
    Vote Rating
    13
    Mthor will become famous soon enough

      0  

    Default


    in your controller you need to add a controller reference, reference your button. first set your target type to Ext.button then in the control Query set a ref to your button(#buttonId), scroll down to name, set the name to "tap", then you can change the name of your function from onButtonTap to whatever makes you happy. from there now when you click on that button you should be able to set a break point in that controller. from there now depends on what kind of layout you are doing. If a card layout then you can use a setActiveItem(cardIndex); same with tab panel. I doubt you are doing a navigation view since you seem kinda new, but the navigation view is a great tool to use, as it will add a back button for you when you go to the next screen you want to show. Now you need to have a reference to your panel you are setting the activeItem of, so drag reference from the left into that controller and reference the panel you are setting the active item of.

  3. #3
    Sencha User
    Join Date
    Nov 2012
    Posts
    4
    Vote Rating
    0
    tres3tre is on a distinguished road

      0  

    Default


    thank you for you reply. In the first sentence you say to reference the button. What name do i ref it with id, itemid? also when ref the panel because i want to move to a panel how do i ref that also what name? Also if you can give me the code to plug in for the controllers to activate new panel on button tap ? Thank you

  4. #4
    Sencha User
    Join Date
    Nov 2012
    Posts
    4
    Vote Rating
    0
    tres3tre is on a distinguished road

      0  

    Default


    thank you for you reply. In the first sentence you say to reference the button. What name do i ref it with id, itemid? also when ref the panel because i want to move to a panel how do i ref that also what name? Also if you can give me the code to plug in for the controllers to activate new panel on button tap ? Thank you

Thread Participants: 1

Tags for this Thread