So you aren't using the tag attribute as described in the 0.9 spec. I
will give this a shot thanks.
Steve T.
On May 1, 2009, at 4:32 PM, "Jordan Zimmerman" <[email protected]> wrote:
Here's the start of a template we use:
<script name="FriendsProfile" type="text/os-template"><div
if="${Top.ownerFriends.length gt 0}"><div class="div"
repeat="ownerFriends"><table border="0" cellpadding="0"
cellspacing="0"
width="100%">
<tr if="${Index % 2 == 0 and Index lt 5}" valign="top">
<td align="left" class="myfriends_white_row" valign="middle"
width="50px"><img alt="" border="0"
src="http://ccimg.shop.com${thumbnailUrl}" title=""/></td><td
align="left" class="myfriends_white_row" valign="top"><b class=" ccvvs
color_tx_333">${displayName}</b><br/>
<span class="ccvvs
color_tx_5f9637">(${name.unstructured})</span></td><td align="right"
class="myfriends_white_row" valign="top"><table border="0"
cellpadding="0" cellspacing="0">
** snip **
Then as one of the last calls in our gadget we have this:
<script language="javascript">
<!--
sc_gadget_draw_friends_profile();
// -->
</script>
The body of the function is:
function sc_gadget_draw_friends_profile()
{
function _handler(data)
{
var friends = { 'owner': data.get('owner').getData(),
'viewer': data.get('viewer').getData(),
'ownerFriends':data.get('ownerFriends').getData().asArray()}
os.
getTemplate(TEMPLATE_FRIENDS_PROFILE).renderInto(document.getElementB
yId(SC_GADGETCONTAINER),friends);
}
var params = {};
params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] =
[opensocial.Person.Field.ALL];
var req = opensocial.newDataRequest();
req.
add(req.newFetchPersonRequest(opensocial.IdSpec.PersonId.VIEWER,para
ms), 'viewer');
req.
add(req.newFetchPersonRequest(opensocial.IdSpec.PersonId.OWNER,param
s), 'owner');
req.add(req.newFetchPeopleRequest(opensocial.newIdSpec({ "userId" :
"OWNER", "groupId" : "FRIENDS" }),params), 'ownerFriends');
req.send(_handler);
}
Jordan Zimmerman
Principal Software Architect
831.647.4712
831.214.2990 (cell)
[email protected]
SHOP*COMTM
Shop Smart, Save Big(tm)
www.shop.com
This message (including any attachments) is intended only for
the use of the individual or entity to which it is addressed and
may contain information that is non-public, proprietary,
privileged, confidential, and exempt from disclosure under
applicable law or may constitute as attorney work product.
If you are not the intended recipient, you are hereby notified
that any use, dissemination, distribution, or copying of this
communication is strictly prohibited. If you have received this
communication in error, notify us immediately by telephone and
(i) destroy this message if a facsimile or (ii) delete this
message
immediately if this is an electronic communication.
Thank you.