1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    76
    Answers
    1
    Vote Rating
    1
    Monti123 is on a distinguished road

      0  

    Default Unanswered: Dynamically changing DataItem components

    Unanswered: Dynamically changing DataItem components


    Hi,

    I have a DataView with DataItem's, each item has a button.

    I would like to change that button's text & color each time it is clicked.

    Since I'm only storing the data of the elements that were clicked in localstorage, and all the raw data (elements that were clicked and those that weren't) in a store, I need to:
    1. Look in the localstorage to see if each item has been clicked (from the localstorage)
    2. Have the controller, listening to the tap event of the button click, update the button's itself (text & color).

    I think I need to override some functions in the DataItem's view, but I don't know how to do it.

    Help.

    Thanks!!

  2. #2
    Sencha User
    Join Date
    Mar 2012
    Posts
    76
    Answers
    1
    Vote Rating
    1
    Monti123 is on a distinguished road

      0  

    Default


    Basically, what would solve my issue, is giving more advanced behavior to the button, for example:

    dataMap: {

    getNameButton: {
    setText: If(condition) 'Name1' else 'Name2' //Here I can change the text on the button, and maybe the color of it.
    }

    }

Tags for this Thread

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