Results 1 to 3 of 3

Thread: Combined binding solution

  1. #1

    Default Combined binding solution

    Hello! I need to make some view display and update its rows when each row rendering depends not only on row's own Ext.data.Model instance, but also on some global parameter, for example, defined in Application main controller config section, which is also change. When the model or config parameter changes I need to calculate some expression and render row depending on result. I want to do this without calling view.refreshNode(). How do you think, which is the best solution to do this? Is it possible and valid to use binding here?

    For more detailed example, I need to show delete action button in a row only when the row is owned by current user (model's userId) and current session has license for read/write operations now (global parameter which can change).
    Last edited by trigger_af; 4 Aug 2014 at 12:40 AM. Reason: edit details

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379
    Answers
    3997

    Default

    I don't think data binding is proper here, if you change data of the record for that row, that row's node will get updated to reflect that data change.
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  3. #3

    Default

    Thanks fo reply! Yes the node will get updated to reflect the data change and it's a nice thing in ExtJs!. The only thing I need is to make it reflect not only row's model data change, but also some property which is global for all rows and used in row renderer calculations. The only solution I know is to call view.refresh() when the property changes, but the beauty of automatic view updates is lost in this case.

    P.S. Returned here because of the third place where I have such a situation.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •