Apurv - following your advice, I found the following:

"opensocial-0.8":{"path":"http://%host%/
api","domain":"google.com","supportedFields":{"person":
["id","name","thumbnailUrl","nickname"],"filterType":
["all","hasApp"],"activityMediaItem":
["type","mimeType","url"],"activity":
["id","externalId","userId","appId","streamTitle","streamUrl","streamSourceUrl","streamFaviconUrl","title","body","url","mediaItems","postedTime"],"sortOrder":
["name"],"name":
["unstructured","familyName","givenName","additionalName","honorificPrefix,
honorificSuffix"]},"impl":"rpc","enableCaja":false}

There is nothing listed for id, name, givenName, familyName, etc.

As I said earlier, I tried

<div if="${Cur.viewer != null}">yes</div>
<div if="${Cur.viewer == null}">yes2</div>

for all three cases. I tried it for (a) owner viewing app on his own
profile, (b) visitor with app installed viewing app on friend's
profile, and (c) visitor withOUT app installed viewing app on friend's
profile.

In all 3 cases, "yes2" was output. I am not sure what this means, but
at the very least it means Cur.viewer shows no distinction between the
three cases.

On Apr 9, 9:23 pm, Apurv Gupta <apurv.gu...@gmail.com> wrote:
> <div if="${Cur.viewer != null}"> is what you need. Since viewer is not
> available, you have to use Cur to refer to it.
> Bit offtopic,
> Here's a little debugging tip that would help you see the data that os-data
> section generates.
> - Open the application iframe in a new tab
> - Remove parameter sanitize=1 and reaload
> - view source of frame.
> - You'll find a opensocial.data.DataContext.putDataSet( which has the result
> of evaluation of os-data section
>
> Let me know if above doesn't work for you.
>
> On Fri, Apr 10, 2009 at 4:27 AM, Badaro <bad...@gmail.com> wrote:
>
> > No, it doesnt. But even if it did, it's not the problem. I already
> > have a working test for the "viewer has app" case: ${viewer !=null}
>
> > What I need is a working test for the negative case: "viewer does not
> > have app". I already made several tests, and none worked:
>
> >    <h5 if="${viewer == null}">Viewer does not have App (A)</h5>
> >    <h5 if="${!viewer}">Viewer does not have App (B)</h5>
> >    <h5 if="${typeof(viewer) == 'undefined'}">Viewer does not have App
> > (C)</h5>
>
> > On Apr 9, 12:31 pm, Apurv Gupta <apurv.gu...@gmail.com> wrote:
> > > Does <div if="${viewer}"> work for you?
>
> > > On Tue, Apr 7, 2009 at 7:07 PM, Badaro <bad...@gmail.com> wrote:
>
> > > > Jota,
>
> > > > This is not a test for what I want.
>
> > > > I need to tell if I have a viewer without the application, since in
> > > > these cases I can't access any information about the viewer, and I
> > > > need to adjust the layout of the profile.
>
> > > > Filipe Badaro
>
> > > > On Apr 6, 7:28 pm, Jota <jefferson.ru...@gmail.com> wrote:
> > > > > Have you tried this:
>
> > > > > <li if="${owner.isViewer}">__MSG_Your Ranking__</li>
>
> > > > > <li if="${owner.isViewer eq null}">__MSG_Ranking__</li>
>
> > > > > []'s,
> > > > > Jota
>
> > > > > On Mon, Apr 6, 2009 at 1:47 PM, Badaro <bad...@gmail.com> wrote:
>
> > > > > > I asked the same question last week, and I'm still waiting for an
> > > > > > answer:
>
> >http://groups.google.com/group/opensocial-orkut/browse_thread/thread/.
> > > > ..
>
> > > > > > I few tests I already made, all failures:
>
> > > > > >    <h5 if="${viewer == null}">Viewer does not have App (A)</h5>
> > > > > >    <h5 if="${!viewer}">Viewer does not have App (B)</h5>
> > > > > >    <h5 if="${typeof(viewer) == 'undefined'}">Viewer does not have
> > App
> > > > > > (C)</h5>
>
> > > > > > Sample gadget here:
> > > > > >http://badaro.labone.net/ostemplates/gadget
>
> > > > > > On Apr 4, 8:20 pm, aj <a7a4.s...@gmail.com> wrote:
> > > > > > > In my widget I would like to change the messaging if the visitor
> > does
> > > > > > > not have the widget installed. But I don't see a way to perform
> > this
> > > > > > > check correctly
>
> > > > > > >    <Require feature="opensocial-0.9" />
>
> > > > > > >    <script xmlns:os="http://ns.opensocial.org/2008/markup";
> > > >  type="text/
> > > > > > > os-data">
> > > > > > >             <os:ViewerRequest key="theviewer"/>
> > > > > > >     </script>
>
> > > > > > >     <script type="text/os-template">
> > > > > > >         <div if="${'theviewer' != ''}">
> > > > > > >                <p>1.Viewer is not null</p>
> > > > > > >         </div>
>
> > > > > > >         <div if="${empty theviewer }">
> > > > > > >                <p>2.Viewer is empty</p>
> > > > > > >         </div>
>
> > > > > > >         <div if="${ 'theviewer' =='' }">
> > > > > > >                <p>3.Viewer is empty</p>
> > > > > > >         </div>
>
> > > > > > >      </script>
>
> > > > > > >       1.Viewer is not null, is printed always
> > > > > > >       2.Viewer is empty , is never printed.
> > > > > > >       3.Viewer is empty, is never printed.
>
> > > > > > > What is the correct syntax?  Is this documented somewhere in
> > > > entirety?
>
> > > > > > > Thanks,
> > > > > > > AJ
--~--~---------~--~----~------------~-------~--~----~
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