Results 1 to 4 of 4

Thread: perform read (load) operation from singleton model

  1. #1

    Default Answered: perform read (load) operation from singleton model


  2. Looks like Mitch found your post and provided a nice explanation:
    Quote Originally Posted by mitchellsimoens
    The load method listed on Ext.data.Model is a static method on the class definition, not an instance. The documentation even denotes this is a static method. When you want to load a record, you don't load an already instantiated record, you load the model definition and that loading creates an instance.

    The save method listed on Ext.data.Model is an instance method, the docs do not denote this as a static method. You don't save a class definition, you save an instance.

    Example usage: https://fiddle.sencha.com/#fiddle/lvj

  3. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    Looks like Mitch found your post and provided a nice explanation:
    Quote Originally Posted by mitchellsimoens
    The load method listed on Ext.data.Model is a static method on the class definition, not an instance. The documentation even denotes this is a static method. When you want to load a record, you don't load an already instantiated record, you load the model definition and that loading creates an instance.

    The save method listed on Ext.data.Model is an instance method, the docs do not denote this as a static method. You don't save a class definition, you save an instance.

    Example usage: https://fiddle.sencha.com/#fiddle/lvj

  4. #3

    Default

    Yes thanks, I forgot to report back!

    ** I mistakenly marked this as best answer and cannot unmark it, where shall I do that?

  5. #4
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    I've reset the answer for you on this thread.

Similar Threads

  1. Replies: 1
    Last Post: 14 Jan 2014, 10:30 AM
  2. Different between Singleton Model and Using Registry?
    By shingocat in forum Ext GWT: Q&A
    Replies: 0
    Last Post: 10 May 2012, 11:14 PM
  3. Ext.data.Operation Read method problem
    By jakobgrannas in forum Sencha Touch 2.x: Q&A
    Replies: 4
    Last Post: 7 Feb 2012, 12:29 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
  •