Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Highlighted
Retired
Posts: 499
Registered: ‎05-07-2012
My Device: developer
My Carrier: developer

Re: need advice about getting data from web

You have several separate steps you are trying to do.

- open a webpage

- get the results

- parse the results into data you want to display

- display the data in a grid.

 

It's not clear to me which part you're stuck on.  Try breaking this into a few steps rather than trying to get it all working at once.

 

Two independent steps:

  1. Using some hard-coded data, show the data in a grid.  That uses the new grid layout (see the link in an earlier post in this thread)
  2. Get data from a webpage and print it to the console

Next steps:

  • Extract the data you want from the webpage data and print it to the console
  • Feed this data to the datamodel used by the list view.

Let us know how this goes and where you're blocked.

 

Stuart

Regular Contributor
Posts: 56
Registered: ‎03-02-2012
My Device: 9780 & Playbook 32GB & Dev Alpha
My Carrier: Vodafone GR

Re: need advice about getting data from web

"1.Using some hard-coded data, show the data in a grid.  That uses the new grid layout (see the link in an earlier post in this thread)"

 

gridlist or listview? 

 

this is my first problem. the secont is actually the hard-coded data! I thought it was going to be easy to get the data i want form a simple text page like the one i posted.But it is not. and i can't find anything like an xml web page except this one:

http://xml.scores24live.com/

 

When I say easy, i mean easy for me. it might be easy for anyone with c++/qt/qml understanding. 

I ll keep studying and trying and i ll let you know what ll happen. at the moment, this app is stuck.

The second app i am working is stuck at the same point. i want to implement an rss feed in a qml page, still with no success. it would be great for all newbies devs if a sample code for rss feed would be here.i ll post it once i figure out how to do it! lol.

Retired
Posts: 499
Registered: ‎05-07-2012
My Device: developer
My Carrier: developer

Re: need advice about getting data from web

[ Edited ]

Seems you're right.  If you use a list you can have:

                layout: GridListLayout {
                    columnCount: 2
                }

but it's not immediately clear to me how to format cascadescookbookqml Color.qml correctly, currently.

 

You can make your own XML web page, presumably, for a test.

 

You still have to code the fetch of the (asynchronous) data.   This kind of thing is best done in C++.

 

Stuart