Results 1 to 2 of 2

Thread: data.Store Questions

  1. #1

    Default data.Store Questions

    Greetings. I am LOVING sencha touch and the opportunities it presents.

    I am having some issues working with the data.Store / Model architecture.

    At the most basic, I am trying to save user data from a form, save it locally, then be able to recall it.

    This is what I thought my basic structure would look like:

    [ [user1], [user2], [user3] ], where user1-3 are arrays containing the form data.

    I created a class, each of which has it's own data store that holds the form data, then I insert the object into another data store.

    I finally got this working how I want, but the way I have to access different data seems kind of ludicrous.

    For instance, if I wanted to get user1's name from the array above i would have to do:

    PHP Code:[0] 
    charStore is the dataStore where the users live, and charData is the individual store inside each object that holds the stats.

    I've made two model types, one for the form data and one for the users themselves. I'm pretty sure I have the form data one right, but the user one is a little trickier:

    PHP Code:
    Ext.regModel('Character', {
    fields: [
    // {name: 'name', type: 'string'},
        //     {name: 'id', type: 'int'},
    Namely, I'm not sure if you can have a type of object.

    I feel like I am doing this TOTALLY wrong. Can someone help? I've been going off of the forms and Solitaire examples so far.


  2. #2
    Sencha User
    Join Date
    Jun 2010


    See the documentation for for instructions on how to create your own data type. You may be able to use AUTO (I'm not sure), but it would be best to have your own defined data type.

Similar Threads

  1. Replies: 3
    Last Post: 15 Jun 2010, 11:10 AM
  2. Json Data Store Questions
    By dcipher in forum Ext 3.x: Help & Discussion
    Replies: 8
    Last Post: 11 Nov 2009, 10:51 AM
  3. Basic CRUD Grid and Data.Store questions
    By vendiddy in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 17 Dec 2007, 5:49 PM
  4. Data Grid Questions
    By ruicosta in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 18 May 2007, 5:36 AM

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