Page 1 of 2

Pictures saved in database don't display in list item

Posted: Mon Aug 18, 2014 7:07 pm
by Peter Viglietta

Please see my screenshot below. The explanation begins with the text in the yellow box. Thanks for any help you can provide.

Image


Pictures saved in database don't display in list item

Posted: Mon Aug 18, 2014 8:10 pm
by Evgene Karachevtsev

Hello Peter,

Could you please try to debug your application with weinre, please look, maybe some errors occur:
http://devcenter.appery.io/documentat...


Pictures saved in database don't display in list item

Posted: Tue Aug 19, 2014 3:15 am
by Peter Viglietta

When I try it in the browser, after opening the ViewPictures screen, I check in Console Errors and there is nothing

Under Console All there is a reference error 'MessageThreadID' is not defined.

Is there somewhere else I should be checking for errors? It's not clear from the directions Evgene sent.

I can't user Weinre to check for errors when sending a picture to the database, since the camera feature doesn't work in the browser. I can only test it on the device.

Could somebody please review my screenshot and confirm whether or not it appears that I have it configured correctly? Does it look like it should work the way I have it set up currently?


Pictures saved in database don't display in list item

Posted: Tue Aug 19, 2014 4:20 pm
by Evgene Karachevtsev

Peter,

You should use weinre to debug on a remote device, please read the doc again:
http://devcenter.appery.io/documentat...
You should install the application on the device, then in Weinre you will be able to see messages from browser console from the device.


Pictures saved in database don't display in list item

Posted: Wed Aug 20, 2014 3:36 am
by Peter Viglietta

Evgene, I tried this but when I launch the app from my iPhone it doesn't show up under Targets in Weinre.


Pictures saved in database don't display in list item

Posted: Wed Aug 20, 2014 3:26 pm
by Evgene Karachevtsev

Peter,

On your screenshot is not visible what code you use to query with where. It turns out that you can't see images in listitems, because they don't display, but they should appear if you test the application in the browser (i.e. you do not need to install the application on the device). Please look what is returned in the response MisConnectDB_Pictures_list_service.


Pictures saved in database don't display in list item

Posted: Thu Aug 21, 2014 10:11 pm
by Peter Viglietta

Evgene, please see my updated screenshot for the JS code in the where parameter.

I need the pictures to display on the device, it doesn't help me if they appear in the browser.

If the pictures don't appear in list items, can you please advise a different component I should use to make the pictures appear using the Pictures_List_Service, with the JS code you see in my screenshot?

Image


Pictures saved in database don't display in list item

Posted: Fri Aug 22, 2014 2:34 am
by Yurii Orishchuk

Hi Peter,

Thanks for your clear question form.

Your code looks ok.

But i can't see how do you set "MessageThreadId" LSV. I guess it could be a problem.

Please give us your app public link and describe steps to reproduce this problem.

We will take a look.

Thanks & regards.


Pictures saved in database don't display in list item

Posted: Fri Aug 22, 2014 4:24 am
by Peter Viglietta

Hi Yurii,

The rows in the Pictures table are getting created with the correct MessageThreadID.

http://appery.io/app/mobile-frame?src...

Steps:

  • Log in:
    User - guy
    Password - guy

  • click Messages at the bottom

  • click on the list item that says MessageThread/Message, which is in a mobile list item. (This is where LSV MessageThreadID is set. See Pages MessageThreads Design Tab Events mobileListItem2, the click action to Set Local Storage Variable).

  • Once you're in the MessageThread, click Pictures at the bottom.

  • No pictures display here, even though there is a row in the pictures table that has the correct MessageThreadID (I checked).

    Since this involves taking pictures, you unfortunately won't be able to test taking pictures in the browser

    I'm also having a problem where LSVs don't get reset if you hit the 'back' button. I think this started happening when I added the Camera screens. Not sure if it might be related.

    Thanks in advance for any help you can give.


Pictures saved in database don't display in list item

Posted: Fri Aug 22, 2014 6:06 am
by Yurii Orishchuk

Peter,

Ok, i've checked your APP,

And here is a reason of your problem:

You have a code:

pre

var MessageThreadID = localStorage.getItem("MessageThreadId");

var whereObject = {"MessageThreadId": MessageThreadId};

return JSON.stringify(whereObject);

/pre

In this code you have devined "MessageThreadID" and then use other (not defined) variable "MessageThreadId". See details: http://prntscr.com/4f8n3e/direct

So correct code is:

pre

var MessageThreadID = localStorage.getItem("MessageThreadId");

var whereObject = {"MessageThreadId": MessageThreadID };

return JSON.stringify(whereObject);

/pre

Regards.