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 <[email protected]> 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 <[email protected]> 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 <[email protected] > >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 <[email protected]> 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 < > > > [email protected]>wrote: > > > > > > > Have you tried the following? > > > > > > > <div repeat="${owner_data[owner.id].videos}"> > > > > > ${Cur.title} > > > > > </div> > > > > > > > On 31 mar, 16:06, Jota <[email protected]> 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 <[email protected]> > > > 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/opensocial-orkut?hl=en -~----------~----~----~----~------~----~------~--~---

