Page 2 of 3

Connecting to xml on local storage

Posted: Fri Mar 15, 2013 5:33 pm
by leonardo

Marina, here are the screenshots:

Image

Image

Image

Image

Image

Image

Image

Image


Connecting to xml on local storage

Posted: Fri Mar 15, 2013 5:39 pm
by leonardo

BTW, the expanded Response looks like this:
Image


Connecting to xml on local storage

Posted: Fri Mar 15, 2013 6:24 pm
by Kateryna Grynko

Hi Leonardo,

In XML in field "th" there is an image name. This name is substituted in picture element, but you can't find where the file is located by its name. So the image is not displayed.

"th" field should contain not just the image name but the path.


Connecting to xml on local storage

Posted: Fri Mar 15, 2013 7:04 pm
by leonardo

For the image, is there no way to give a relative path, maybe with coding? The path is going to change from what I have now on my system, because this will all reside on the user's device.

The other 2 problems relate to the display of the names. Right now everything I search for is ignored, as in the example above with "Grace." Instead of the searched name "Rodrigo" is always displayed.

This is what I want:

  • Display all the names at startup on the startScreen.
  • Display the matching name when searched.

Connecting to xml on local storage

Posted: Fri Mar 15, 2013 7:38 pm
by Kateryna Grynko

1) In mapping, you can add relative path. For the according mapping click AddJS and paste the following code: codereturn 'relative/path' + value;/code
2) To Display all the names at startup on the startScreen, in outputGrid create mapping from person (not from names).

3) There are a lot of ways to display the matching name when searched.

For example, you can go through all the elements and hide those where text in fName doesn't coincide with the set value, and show those where coincides.


Connecting to xml on local storage

Posted: Fri Mar 15, 2013 8:30 pm
by leonardo

Ok Katya. It's getting there! I got no 2 solved. All the names now display at startup.

1) Image is still not displaying. I put the code "return 'relative/path' + value;" in the JS of "th Response" but it is not displaying. When I tested it with:
codetrace('relative/path' + value);/code
It just returned:
coderelative/pathRogrigo.gif/code
It returned similarly for the other 2. It seems that it just captured it as a literal string.

3) I am new to this. Could you show me how to capture the value in the searchButton and use it to filter the elements in fNames? Thanks.


Connecting to xml on local storage

Posted: Fri Mar 15, 2013 10:12 pm
by Kateryna Grynko

1) 'relative/path' is a literal string that should be replaced with relative or absolute path.
2) please share your app with a href="mailto:support@tiggzi.com" rel="nofollow"support@tiggzi.com/a so we can help you.


Connecting to xml on local storage

Posted: Fri Mar 15, 2013 10:46 pm
by leonardo

Yes, I have shared it. Please note that the startScreen is supposed to show all the names and their pics and the Filtered page is supposed to show only a list of the matching names and their pic when search is performed.


Connecting to xml on local storage

Posted: Mon Mar 18, 2013 9:14 am
by Kateryna Grynko

Hi,
Thank you for sharing, we are working on it.


Connecting to xml on local storage

Posted: Mon Mar 18, 2013 4:00 pm
by Maryna Brodina

Hello!

1) You would need to add assets (images) with corresponding names (as in you xml)

2) on startScreen in mapping JS change line

code return 'relative/path' + value;/code
to
codereturn Tiggzi.getImagePath(value);/code

Also there is no need to use Filtered page to filter results. You can use JS to do that on startScreen.