Page 1 of 1

Tutorials problem: Building a ToDo app pt. 2: offline mode

Posted: Sat Jan 03, 2015 3:20 pm
by Thomas Hultgren

First problem:
I'm using the Tutorial Building a ToDo app pt. 2: offline mode and I'm getting an error regarding: todoDB_todo_delete_service when I try to test it?

Error: Can't perform substitution for {_id}

Second problem:
The Tutorial it never tells you to do the variable _taskId in Model and Storage it only tells you to create the _taskName. So I created it any way. Is that correct?

Thanks in advance.
/thomas


Tutorials problem: Building a ToDo app pt. 2: offline mode

Posted: Sat Jan 03, 2015 4:33 pm
by Alena Prykhodko

Hello,

First: Could you please provide us Service settings, Request, Response tabs screenshots.

Second: Yes. You create both.


Tutorials problem: Building a ToDo app pt. 2: offline mode

Posted: Sun Jan 04, 2015 11:28 am
by Thomas Hultgren

Hi,

Here is the screenshots
Image

Image

Image


Tutorials problem: Building a ToDo app pt. 2: offline mode

Posted: Mon Jan 05, 2015 1:11 am
by Yurii Orishchuk

Hi Thomas,

It seems you don't pass "_id" request parameter to this service.

Please show us how do you invoke this service. And service datasource "before send" mapping.

Regards.


Tutorials problem: Building a ToDo app pt. 2: offline mode

Posted: Mon Jan 05, 2015 3:23 pm
by Thomas Hultgren

Hi,

Ok, I hope this is what you need.

Regards
Thomas

Image

Image


Tutorials problem: Building a ToDo app pt. 2: offline mode

Posted: Mon Jan 05, 2015 11:43 pm
by Yurii Orishchuk

Hi Thomas,

Lets check what is stored in your "_taskId" storage.

  1. Open this "before send" mapping.

  2. Click on "_id" request parameter "JS" button.
    Details: http://prntscr.com/5ozfxw/direct

  3. Populate with following JS code:

    pre

    console.log("_taskId = '" + value + "'");

    return value;

    /pre

    Then try again and take a look into console to see what _taskId you actually have in your storage.

    Regards.