1. #1
    Sencha User
    Join Date
    Apr 2012
    Location
    London
    Posts
    17
    Vote Rating
    1
    pbenoit is on a distinguished road

      0  

    Default Button in container to trigger video with data from container

    Button in container to trigger video with data from container


    I have a container that contains some data from a store (passed through from a list). I also have a button in the container and I want to somehow trigger a video panel on clicking the button, but the video link must come from the store.
    Data flow would be like this: List > detailView (containing button) > on button tap link data gets handed through to controller to include in video view.

    Are there any examples of this online. I have tried to add an onclick to a button element in the tpl of the detailView, just get 'function undefined'.

    Any ideas or starting suggestions would be great.

    Phil

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,404
    Vote Rating
    850
    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 would set the record onto the container so you can access it anytime within the record. Like on button tap, you can get the container and the record and use the get method on the record to get the video url.
    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.

Thread Participants: 1

Tags for this Thread