Results 1 to 8 of 8

Thread: How can store load Synchronous

  1. #1
    Sencha User
    Join Date
    Oct 2016
    Posts
    36
    Answers
    2

    Default How can store load Synchronous

    https://fiddle.sencha.com/#view/editor&fiddle/1on5


    i find some likely config from api and try them

    but there is no effect

    please help me~thanks

  2. #2
    Sencha - Sustaining Engineer tristan.lee's Avatar
    Join Date
    Mar 2015
    Location
    Central Ohio
    Posts
    1,579
    Answers
    165

    Default

    I don't know that this is available functionality. According to the documentation:

    This defaults to true when this store's proxy is asynchronous, such as an Ext.data.proxy.Ajax.When the proxy is synchronous, such as a Ext.data.proxy.Memory memory proxy, this defaults to false.
    NOTE: This does not cause synchronous Ajax requests if configured false when an Ajax proxy is used. It causes immediate issuing of an Ajax request when load is called rather than issuing the request at the end of the current event handler run.
    Tristan Lee
    Sencha Inc - Sustaining Engineer


    Having an issue? Help us help you - be detailed; provide some code; demonstrate with a fiddle (fiddle.sencha.com)

    Embed your fiddle in your post: [FIDDLE]id[/FIDDLE]

  3. #3
    Sencha User
    Join Date
    Oct 2016
    Posts
    36
    Answers
    2

    Default

    Quote Originally Posted by tristan.lee View Post
    I don't know that this is available functionality. According to the documentation:

    [/FONT][/COLOR]
    do you know how can store load Synchronous?

  4. #4
    Sencha - Sustaining Engineer tristan.lee's Avatar
    Join Date
    Mar 2015
    Location
    Central Ohio
    Posts
    1,579
    Answers
    165

    Default

    What exactly are you trying to do? There's most certainly a way to do it asynchronously.
    Tristan Lee
    Sencha Inc - Sustaining Engineer


    Having an issue? Help us help you - be detailed; provide some code; demonstrate with a fiddle (fiddle.sencha.com)

    Embed your fiddle in your post: [FIDDLE]id[/FIDDLE]

  5. #5
    Sencha User
    Join Date
    Dec 2015
    Posts
    117
    Answers
    12

    Default

    Quote Originally Posted by tristan.lee View Post
    What exactly are you trying to do? There's most certainly a way to do it asynchronously.
    In my particular case, I need (meta)data from the server in order to create components.


    Thank you,

  6. #6

    Default

    Load the first store, in the success handler of the first store load the second store.
    In the success handler of the second store generate your components.

  7. #7
    Sencha Premium User dawesi's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia (aka GMT+10)
    Posts
    1,242
    Answers
    26

    Default

    Quote Originally Posted by Armin Memisevic View Post
    Load the first store, in the success handler of the first store load the second store.
    In the success handler of the second store generate your components.
    search the forums, there's plenty of examples of this with one store, no need for two.
    Cloud Application Architect

    Sencha Specialist / Sencha MVP / Sencha Technical Trainer
    ExtJs Developer + Contributor since 0.2.2 - Champion of the per developer license.

  8. #8
    Sencha User
    Join Date
    Dec 2015
    Posts
    117
    Answers
    12

    Default

    In my case I have no control over component construction: a 3rd party plugin create an instance of my class then call getItems() then create components based on those.
    This require synchronous execution, and I can't think of a way to make this asynchronous unless the 3rd party changes their implementation to allow asynchronous getItems().
    The alternative right now would be to create a separate synchronous ajax call to retrieve the data...I don't think we can make the store load synchronously.

Similar Threads

  1. store synchronous load
    By juanb in forum Ext: Discussion
    Replies: 12
    Last Post: 9 Feb 2014, 6:56 AM
  2. Is load synchronous for localStorage stores?
    By evschu in forum Sencha Touch 1.x: Discussion
    Replies: 0
    Last Post: 3 Oct 2011, 11:36 AM
  3. Synchronous store load
    By nayak14 in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 21 Sep 2009, 10:38 AM
  4. Data store load wants synchronous
    By rsuplido in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 28 Jun 2007, 8:54 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
  •