Specifically, the position of the os-data script seems to determine
whether or not the data is obtained. Below are the contents of the
(somewhat simplified) canvas body tag.
This works:
<div id="mainCanvas">
<script xmlns:os="http://ns.opensocial.org/2008/markup"
type="text/os-data">
<os:PeopleRequest key="friends" userId="@viewer"
groupId="@friends" />
</script>
<div id="causesTabset"></div>
<div id='tabcontent-tellFriends'>
<div id="installApp" style="display:none">
<p>You need to have the App installed to share your cause with
your friends.</p>
</div>
<div id="haveApp" style="display:none">
<form>
<h3>Inform your friends about Global Warming</h3>
<div id="errorMessage" class="error"></div>
<script type="text/os-template">
<ul>
<li repeat="${friends}">
<div class="thumbnail"><img src="${Cur.thumbnailUrl}" /></
div>
<p id="id${Context.Index}"><input type="radio" value="$
{Cur.id}" name="sendToFriends" class="radio"><a href="/$
{Cur.profileUrl}">${Cur.name.givenName}</a></p>
</li>
</ul>
</script>
<div id="messageContainer">
<p />
<input type='button' value='Send Global Warming Message'
onClick='sendMessage();' /><br />
</div>
</form>
</div>
</div>
</div>
While this does not work. The viewer friends data is missing. note
that this time the script tag is outside of the mainCanvas div.
<script xmlns:os="http://ns.opensocial.org/2008/markup" type="text/os-
data">
<os:PeopleRequest key="friends" userId="@viewer"
groupId="@friends" />
</script>
<div id="mainCanvas">
<div id="causesTabset"></div>
<div id='tabcontent-tellFriends'>
<div id="installApp" style="display:none">
<p>You need to have the App installed to share your cause with
your friends.</p>
</div>
<div id="haveApp" style="display:none">
<form>
<h3>Inform your friends about Global Warming</h3>
<div id="errorMessage" class="error"></div>
<script type="text/os-template">
<ul>
<li repeat="${friends}">
<div class="thumbnail"><img src="${Cur.thumbnailUrl}" /></
div>
<p id="id${Context.Index}"><input type="radio" value="$
{Cur.id}" name="sendToFriends" class="radio"><a href="/$
{Cur.profileUrl}">${Cur.name.givenName}</a></p>
</li>
</ul>
</script>
<div id="messageContainer">
<p />
<input type='button' value='Send Global Warming Message'
onClick='sendMessage();' /><br />
</div>
</form>
</div>
</div>
</div>
The gadget xml is located here :
http://85708cf1fde240e2a6a3e8b48d2c460a.zembly.net/things/85708cf1fde240e2a6a3e8b48d2c460a;container=orkut
Is this an expected behavior? Is so, where is it documented?
Thanks!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---