Results 1 to 3 of 3

Thread: Stores: Calling a service that returns json but no SUCCESS field?

  1. #1

    Default Stores: Calling a service that returns json but no SUCCESS field?

    Hi there,

    I have been looking into stores and I wish to create a store to call a restful service that returns a list of fields but no Success field (carrying a boolean). After reading this I left a little confused http://docs.sencha.com/extjs/4.2.2/#....reader.Reader and here
    http://docs.sencha.com/extjs/4.2.2/#...ta.reader.Json

    I can't modify my service to include a Success field but the reader needs one ? I know you can reconfigure the name of the Success property, but i simple don't have one.

    What are my options here?

    Also my model has some properties i.e. UserId but my service returns Id, what are my options for mapping when a model property doesn't match the name of a property being returned from a service.

    Any help really appreciated

    Thanks

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

    Default

    How does your service indicate that the data was successfully generated?

  3. #3
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,256
    Answers
    759

    Default

    The success field isn't required. Omit it from the reader:

    Code:
    successProperty: ''
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

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
  •