Results 1 to 2 of 2

Thread: How do I display a value that's in a store?

  1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    19
    Vote Rating
    0
      0  

    Default How do I display a value that's in a store?

    I have a store with only 1 field in it, vehicleMake. I have a second store, searchResults, which has a number of fields, one of which is "make_index". This make_index is the array index value for the vehicleMake store, so what I want to do is use the index from one store to lookup the value in the second store.

    In a template, {make_index} displays the number. I want to do something like vehicleStore[{make_index}] to display the name of the make (which is the value stored in the vehicleMake store).

    I just don't know the syntax for the store lookup. Thanks.

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    You should use a template method in your XTemplate. The template method would then return whatever value you need to display.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

Posting Permissions

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