YEAH! It works!!!

tks,
Jota


On Tue, Apr 7, 2009 at 2:20 AM, Apurv Gupta <apurv.gu...@gmail.com> wrote:

> no - you can use os:xParseJson in an expression to interpret app data.
> e.g.
> <os:PersonAppDataRequest key="owner_data" method="appdata.get"
> userId="@owner" appId="@app" fields="user_data,videos" />
>
> ${os:xParseJson(owner_data[owner.id]).json_key}
> will give you the json_key.
>
> On Tue, Apr 7, 2009 at 12:55 AM, Jota <jefferson.ru...@gmail.com> wrote:
>
>> Sorry Apurv, but how can I use this function?
>>
>> Do I need to change my current code below:
>>
>> <os:PersonAppDataRequest key="owner_data" method="appdata.get"
>> userId="@owner" appId="@app" fields="user_data,videos" />
>>
>> to a new call like that? (I know it's not working)
>>
>> <os:xParseJson key="owner_data" method="appdata.get" userId="@owner"
>> appId="@app" fields="user_data,videos" />
>>
>> How do I call this function on my gadget?
>>
>>
>> regards,
>> Jota
>>
>>
>>
>>
>> On Sun, Apr 5, 2009 at 1:33 PM, apurv <apurv.gu...@gmail.com> wrote:
>>
>>>
>>>
>>> "${owner_data[owner.id]}"
>>> should give you the Json data as string.
>>>
>>> Use os:xParseJson to convert it into a JSON object and then you can
>>> reference fields inside it.
>>>
>>> [http://svn.apache.org/repos/asf/incubator/shindig/trunk/java/common/
>>> src/main/java/org/apache/shindig/expressions/OpensocialFunctions.java<http://svn.apache.org/repos/asf/incubator/shindig/trunk/java/common/%0Asrc/main/java/org/apache/shindig/expressions/OpensocialFunctions.java>
>>> ]
>>>
>>> On Apr 1, 11:58 pm, Jota <jefferson.ru...@gmail.com> wrote:
>>> > Hi Eduardo,
>>> >
>>> > 1- no good...
>>> >
>>> > 2- I've tried this before and it works fine using Javascript Data
>>> Pipeline,
>>> > but after the profile "big bang" to accept just "os/template", it
>>> stops!
>>> >
>>> > Find below the Javascript that I had used to get data from the SAME
>>> JSON:
>>> > <div id="content_div"></div>
>>> > <script>
>>> > owner_data = opensocial.data.DataContext.getDataSet('owner_data');
>>> > favvideos = gadgets.json.parse(eval("owner_data['" + owner.id +
>>> > "'].videos"));
>>> > ct = '';
>>> > for(i=0; i<favvideos.length; i++) {
>>> >     ct += '<p><img src="'+favvideos[i].thumb+'" width="50"
>>> > style="float:left">ID: '+eval(i+1)+'<br>titulo:
>>> > '+favvideos[i].title+'<br>Comentarios:
>>> > '+favvideos[i].user_description+'</p>';}
>>> >
>>> > document.getElementById('content_div').innerHTML = ct;
>>> > </script>
>>> >
>>> > Can I use JS Data Pipeline in Profile View? (I don't think so...)
>>> >
>>> > regards,
>>> > Jota
>>> >
>>> > On Wed, Apr 1, 2009 at 3:01 PM, eduardorochabr <
>>> eduardoroch...@gmail.com>wrote:
>>> >
>>> >
>>> >
>>> > > 1. Have you tried just ${title}?
>>> >
>>> > > 2. Maybe you can open the IFrame in Firebug and use the javascript
>>> API
>>> > > for Data Pipeline to debug the data format, have you tried that?
>>> >
>>> > > On 1 abr, 12:40, Jota <jefferson.ru...@gmail.com> wrote:
>>> > > > Hi Eduardo,
>>> > > > thanks for your suggestion, but it's not printing anything too...
>>> >
>>> > > > Anyone, please HELP ME!!!
>>> >
>>> > > > []'s,
>>> > > > Jota
>>> >
>>> > > > On Wed, Apr 1, 2009 at 12:13 AM, eduardorochabr <
>>> > > eduardoroch...@gmail.com>wrote:
>>> >
>>> > > > > Have you tried the following?
>>> >
>>> > > > > <div repeat="${owner_data[owner.id].videos}">
>>> > > > >    ${Cur.title}
>>> > > > > </div>
>>> >
>>> > > > > On 31 mar, 16:06, Jota <jefferson.ru...@gmail.com> wrote:
>>> > > > > > Hi Vijaya,
>>> > > > > > I've tried this way but I'm still having problems...
>>> >
>>> > > > > > I've tried:
>>> > > > > > ${owner_data[owner.id][videos][title]}
>>> > > > > > ${owner_data[owner.id][videos].title}
>>> > > > > > ${owner_data[owner.id][videos.title]}
>>> > > > > > ${owner_data[owner.id][videos[title]]}
>>> > > > > > ${owner_data[owner.id][videos][0].title}
>>> > > > > > ${owner_data[owner.id][videos].[0].title}
>>> > > > > > ${owner_data[owner.id][videos].0.title}
>>> > > > > > ${owner_data[owner.id][videos[0]].title}
>>> >
>>> > > > > > and anyone returns anything...
>>> >
>>> > > > > > remembering my JSON is:
>>> > > > > > {"videos":"[
>>> > > > > >     {
>>> > > > > >     \"id\":\"--gFgYElfTg\",
>>> > > > > >     \"thumb\":\"http://img.youtube.com/vi/--gFgYElfTg/2.jpg\";,
>>> > > > > >     \"link\":\"http://www.youtube.com/watch?v=--gFgYElfTg\";,
>>> > > > > >     \"title\":\"1º Gol de Ronaldo Fenômeno no Timão -
>>> Corinthians vs
>>> > > > > > Palmeiras 08/03/2009\",
>>> > > > > >     \"duration\":\"150\",
>>> > > > > >     \"author\":\"MathiasCasavant\",
>>> > > > > >     \"views\":\"\",
>>> > > > > >     \"comments\":\"0\",
>>> > > > > >     \"date_added\":1236801167561,
>>> > > > > >     \"user_description\":\"\"
>>> > > > > >     },{
>>> > > > > >     \"id\":\"eQVwQyixF6M\",
>>> > > > > >     \"thumb\":\"http://img.youtube.com/vi/eQVwQyixF6M/2.jpg\";,
>>> > > > > >     \"link\":\"http://www.youtube.com/watch?v=eQVwQyixF6M\";,
>>> > > > > >     \"title\":\"Corinthians x São Caetano Goals 11/03/2009 Gol,
>>> > > Ronaldo
>>> > > > > > scores Timão\",
>>> > > > > >     \"duration\":\"190\",
>>> > > > > >     \"author\":\"lekfmz\",
>>> > > > > >     \"views\":\"\",
>>> > > > > >     \"comments\":\"0\",
>>> > > > > >     \"date_added\":1236870088794,
>>> > > > > >     \"user_description\":\"\"
>>> > > > > >     }
>>> > > > > > ]"}
>>> >
>>> > > > > > On Tue, Mar 31, 2009 at 9:46 AM, Vijaya <api.vij...@google.com
>>> >
>>> > > wrote:
>>> >
>>> > > > > > > To parse, the JSON data, you can use something like:
>>> ${owner_data
>>> > > > > > > [owner.id][videos]}
>>>
>>>
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Orkut Developer Forum" group.
To post to this group, send email to opensocial-orkut@googlegroups.com
To unsubscribe from this group, send email to 
opensocial-orkut+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/opensocial-orkut?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to