Results 1 to 2 of 2

Thread: How can I change 'link' id before it auto loads?

  1. #1
    Sencha Premium Member
    Join Date
    Feb 2014

    Default How can I change 'link' id before it auto loads?

    In my ViewModel I have:

    links: {
            user: {
                type: 'User',
                id: 0,
    For auto opening existing records, when my new tab is opened, I am passing in a small summary sourceModel that has an id (available in the ViewModel data). I'm trying to figure out how to get that id into the links: id BEFORE it auto loads the more complex model. Any ideas? As soon as I call getViewModel(), it autoloads the links with id:0 before I have a chance to change anything.

    I could switch back to LinkTo where I know I can set the id, but for some reason, I like the links approach since it defines the link where it belongs, whereas the linkTo just seems to blast whatever we want into the ViewModel from an external place.

    Also, how does one deal with complex keys and link, for example, a multi-column primary key? What if it takes two or more parameters to load the model?

  2. #2
    Sencha User mcelotti's Avatar
    Join Date
    Nov 2013


    A bit late but here's a possible solution: link


Similar Threads

  1. add action to each link, intead of just one when container loads
    By mariovde in forum Sencha Touch 2.x: Q&A
    Replies: 1
    Last Post: 15 Jul 2012, 12:37 PM
  2. [CLOSED] [Ext 4.1] Store auto loads models, but grids don't auto load stores
    By Scott Murawski in forum Ext:Bugs
    Replies: 1
    Last Post: 23 May 2012, 2:37 PM
  3. Object forcibly auto loads inside a Ext.NestedList
    By wes.hysell in forum Sencha Touch 1.x: Q&A
    Replies: 2
    Last Post: 8 Feb 2012, 7:34 AM
  4. Replies: 6
    Last Post: 20 Oct 2010, 2:55 AM

Posting Permissions

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