Author: lindner
Date: Mon Nov 15 08:51:24 2010
New Revision: 1035182
URL: http://svn.apache.org/viewvc?rev=1035182&view=rev
Log:
SHINDIG-1467 | Opensocial compliance gadgets
Added:
shindig/trunk/content/gadgets/
shindig/trunk/content/gadgets/compliance-1.0/
shindig/trunk/content/gadgets/compliance-1.0/ExpressionLangSample.xml
shindig/trunk/content/gadgets/compliance-1.0/customTagTemplates.xml
shindig/trunk/content/gadgets/compliance-1.0/helloViewerAndFriends.xml
shindig/trunk/content/gadgets/compliance-1.0/helloWorld.xml
shindig/trunk/content/gadgets/compliance-1.0/helloWorld_FriendsAndViews.xml
shindig/trunk/content/gadgets/compliance-1.0/nestedCustomTagsWithFriends.xml
shindig/trunk/content/gadgets/compliance-1.0/osVarTestGadget.xml
shindig/trunk/content/gadgets/compliance-1.0/ownerRequestViewerRequest.xml
shindig/trunk/content/gadgets/compliance-1.0/sampleAlbumAndContents.xml
Added: shindig/trunk/content/gadgets/compliance-1.0/ExpressionLangSample.xml
URL:
http://svn.apache.org/viewvc/shindig/trunk/content/gadgets/compliance-1.0/ExpressionLangSample.xml?rev=1035182&view=auto
==============================================================================
--- shindig/trunk/content/gadgets/compliance-1.0/ExpressionLangSample.xml
(added)
+++ shindig/trunk/content/gadgets/compliance-1.0/ExpressionLangSample.xml Mon
Nov 15 08:51:24 2010
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<Module>
+ <ModulePrefs title="Expression Language Test Cases" description="Compliance
test for EL features">
+ <Require feature="opensocial-1.0"/>
+ <Require feature="opensocial-templates"/>
+ </ModulePrefs>
+ <Content type="html" view="canvas">
+ <script type="text/os-data">
+ <os:ViewerRequest key='vwr' />
+ <os:PeopleRequest key='friends' startIndex="1" count="100" />
+ <os:AlbumsRequest key='myalbums' userid="@viewer" groupid="@self" />
+ <os:MediaItemsRequest key='mediaItems' userid="@viewer"
groupid="@self" albumid="${myalbums[0].id}" count="20" />
+ </script>
+ <style type="text/css">
+ body{
+ background:#CCC;
+ color:blue;
+ }
+ .person{
+ border:3px solid green;
+ background:#AA3;
+ border-radius:3px;
+ padding:3px;
+ }
+ .photo{
+ border:3px solid red;
+ border-radius:3px;
+ padding:3px;
+ margin-bottom:3px;
+ }
+ .row0{
+ background:lightyellow;
+ color:black;
+ }
+ .row1{
+ background:orange;
+ color:white;
+ }
+
+ </style>
+
+
+ <script type="text/os-template">
+ <h1>Expression Language Samples, custom for ${vwr.displayName}</h1>
+<h2>My Albums</h2>
+<div>Total Count of Albums: ${myalbums.totalResults} (note: this value is not
populated if private album access is not granted)</div>
+<div>Start Index: ${myalbums.startIndex} </div>
+<div>Page Size: ${myalbums.ItemsPerPage} </div>
+
+ <os:Repeat expression="${myalbums}">
+ <div >
+ <img src="${Cur.thumbnailUrl}" />
+ Album: ${Cur.caption} <br />
+ AlbumId: ${Cur.id}
+ </div>
+ </os:Repeat>
+
+ <h2>First Album's Items</h2>
+<div>Total Count of Media Items: ${mediaItems.totalResults}</div>
+<div>Start Index: ${mediaItems.startIndex} </div>
+<div>Page Size: ${mediaItems.ItemsPerPage} </div>
+
+ <h3>Alternating Rows Below</h3>
+
+ <os:Repeat expression="${mediaItems}">
+ ${Context.Index%2=0}
+ <div class="photo row${Context.Index%2}" >
+ <img src="${Cur.thumbnailUrl}" />
+ Photo: ${Cur.title}
+ </div>
+ </os:Repeat>
+
+ <h3>Alternating Rows of Friends With StyleName</h3>
+<div repeat="${friends}" class="row${Context.Index%2}">
+<img src="${Cur.thumbnailUrl}" /> ${Cur.displayName}
+</div>
+
+<h2>Simple Math</h2>
+
+1+1=${1+1} <br/>
+Picture count: ${mediaItems.totalResults} <br />
+Picture Count x 2 = ${2*mediaItems.totalResults} <br />
+
+
+<h2>Using Variables and JSON</h2>
+<os:Var key="myvar">
+{name:"My Object",
+"state": "Live",
+"colors":[
+"blue", "purple", "red", "orange", "yellow", "green"
+]
+}
+</os:Var>
+
+
+<div>Object Name: ${myvar.name}</div>
+<div>
+Colors:
+<os:Repeat expression="${myvar.colors}">
+<div style="width:40px;height:40px;float:left;background:${Cur};"> </div>
+</os:Repeat>
+</div>
+
+ </script>
+ </Content>
+
+</Module>
\ No newline at end of file
Added: shindig/trunk/content/gadgets/compliance-1.0/customTagTemplates.xml
URL:
http://svn.apache.org/viewvc/shindig/trunk/content/gadgets/compliance-1.0/customTagTemplates.xml?rev=1035182&view=auto
==============================================================================
--- shindig/trunk/content/gadgets/compliance-1.0/customTagTemplates.xml (added)
+++ shindig/trunk/content/gadgets/compliance-1.0/customTagTemplates.xml Mon Nov
15 08:51:24 2010
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<Module xmlns:os="http://ns.opensocial.org/2008/markup"
xmlns:my="http://ns.opensocial.org/2008/x">
+ <ModulePrefs title="Simple Custom Tag"
+ description="I love my new custom tags. This displays multiple tag and
template parameter usage variations" >
+ <Require feature="opensocial-1.0"/>
+ <Require feature="opensocial-templates"/>
+ </ModulePrefs>
+ <Content type="html" view="canvas">
+
+ <script type="text/os-template" tag="my:SimpleTag">
+ <h1 style="color:${My.color};" >I am a simple custom tag</h1>
+ </script>
+ </Content>
+
+ <Content type="html" view="canvas">
+ <script type="text/os-template" >
+ <div>
+ <h1>I am on canvas</h1>
+ Custom tags below:
+ </div>
+ <my:SimpleTag color="blue" />
+ <my:SimpleTag >
+ <color>red</color>
+ </my:SimpleTag >
+ </script>
+ </Content>
+</Module>
+
Added: shindig/trunk/content/gadgets/compliance-1.0/helloViewerAndFriends.xml
URL:
http://svn.apache.org/viewvc/shindig/trunk/content/gadgets/compliance-1.0/helloViewerAndFriends.xml?rev=1035182&view=auto
==============================================================================
--- shindig/trunk/content/gadgets/compliance-1.0/helloViewerAndFriends.xml
(added)
+++ shindig/trunk/content/gadgets/compliance-1.0/helloViewerAndFriends.xml Mon
Nov 15 08:51:24 2010
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<Module xmlns:os="http://ns.opensocial.org/2008/markup" >
+ <ModulePrefs title="Friends need Hello also" description="This is the desc">
+ <Require feature="opensocial-1.0"/>
+ <Require feature="opensocial-templates"/>
+ </ModulePrefs>
+ <Content type="html" view="canvas">
+ <script type="text/os-data">
+ <os:ViewerRequest key='vwr' />
+ <os:PeopleRequest key='friends' userId="@viewer" groupid="@friends" />
+ </script>
+ <script type="text/os-template">
+ <h1>Hello world, ${vwr.displayName}</h1>
+ Your friends are:
+
+ <div>
+ <os:Repeat expression="${friends}">
+ <p>
+ Friend number ${Context.index} is: ${Cur.displayName}
+ <img src="${Cur.thumbnailUrl}" />
+ </p>
+ </os:Repeat>
+ </div>
+
+ </script>
+ </Content>
+</Module>
+
Added: shindig/trunk/content/gadgets/compliance-1.0/helloWorld.xml
URL:
http://svn.apache.org/viewvc/shindig/trunk/content/gadgets/compliance-1.0/helloWorld.xml?rev=1035182&view=auto
==============================================================================
--- shindig/trunk/content/gadgets/compliance-1.0/helloWorld.xml (added)
+++ shindig/trunk/content/gadgets/compliance-1.0/helloWorld.xml Mon Nov 15
08:51:24 2010
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<Module xmlns:os="http://ns.opensocial.org/2008/markup" >
+ <ModulePrefs title="Hello World" description="This is the desc">
+ <Require feature="opensocial-1.0"/>
+ <Require feature="opensocial-templates"/>
+ </ModulePrefs>
+ <Content type="html" view="canvas">
+ <script type="text/os-data">
+ <os:ViewerRequest key='vwr' />
+ </script>
+ <script type="text/os-template">
+ <h1>Hello world, ${vwr.displayName}</h1>
+ </script>
+ </Content>
+</Module>
+
Added:
shindig/trunk/content/gadgets/compliance-1.0/helloWorld_FriendsAndViews.xml
URL:
http://svn.apache.org/viewvc/shindig/trunk/content/gadgets/compliance-1.0/helloWorld_FriendsAndViews.xml?rev=1035182&view=auto
==============================================================================
--- shindig/trunk/content/gadgets/compliance-1.0/helloWorld_FriendsAndViews.xml
(added)
+++ shindig/trunk/content/gadgets/compliance-1.0/helloWorld_FriendsAndViews.xml
Mon Nov 15 08:51:24 2010
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<Module>
+ <ModulePrefs title="OSML Hello World" description="A classic Hello World
sample application for OSML"
+
thumbnail="http://c1.ac-images.myspacecdn.com/images02/93/l_9d2ca5019ff9456abdcf743ea5e898d8.png"
+ >
+ <Require feature="opensocial-1.0"/>
+ <Require feature="opensocial-templates"/>
+
+<Icon>http://developer.myspace.com/views/static/img/editsource_on.png</Icon>
+
+ </ModulePrefs>
+ <Content type="html" view="canvas">
+ <script type="text/os-data">
+ <os:ViewerRequest key='vwr' />
+ <os:PeopleRequest key='myfriends' userid="@viewer" groupid="@friends" />
+ </script>
+
+
+ <script type="text/os-template">
+ <style type="text/css">
+ body{
+ background:black;
+ color:white;
+ }
+ .person{
+ border:3px solid green;
+ background:#AA3;
+ border-radius:3px;
+ padding:3px;
+ </style>
+ <h1>Hello world, ${vwr.displayName}</h1>
+
+ <os:Repeat expression="${Top.myfriends}">
+ <div class="person">
+ <img src="${Cur.thumbnailUrl}" />
+ Friend: ${Cur.displayName}
+ </div>
+ </os:Repeat>
+
+
+ </script>
+ </Content>
+
+ <Content type="html" view="profile">
+ <script type="text/os-template">
+<img src="${vwr.thumbnailUrl}" />
+ Hello world, ${vwr.displayName}
+at profile
+</script>
+ </Content>
+
+ <Content type="html" view="home">
+ <script type="text/os-template">
+I'm at home.
+But where's my content?
+</script>
+ </Content>
+
+
+
+</Module>
+
+
Added:
shindig/trunk/content/gadgets/compliance-1.0/nestedCustomTagsWithFriends.xml
URL:
http://svn.apache.org/viewvc/shindig/trunk/content/gadgets/compliance-1.0/nestedCustomTagsWithFriends.xml?rev=1035182&view=auto
==============================================================================
---
shindig/trunk/content/gadgets/compliance-1.0/nestedCustomTagsWithFriends.xml
(added)
+++
shindig/trunk/content/gadgets/compliance-1.0/nestedCustomTagsWithFriends.xml
Mon Nov 15 08:51:24 2010
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<Module >
+ <ModulePrefs title="Complex Custom Tag Nesting"
+ description="Testing of custom tag nesting with different repeaters and
split repeat with If filtering">
+ <Require feature="opensocial-1.0"/>
+ <Require feature="opensocial-templates"/>
+ </ModulePrefs>
+ <Content type="html" view="canvas">
+ <script type="text/os-data">
+ <os:ViewerRequest key='vwr' fields="@all" />
+ <os:PeopleRequest key='myfriends' fields="@all" userid="@viewer"
groupid="@friends" startIndex="1" count="100" />
+ </script>
+ <!-- ==================== CUSTOM TAG ONE - VIEWER DATA ===================
-->
+ <script type="text/os-template" tag="my:ViewerData">
+ <div style="font-weight:bold;color:${My.titleColor}">Summary for
${My.person.displayName}
+ <img src="${My.person.thumbnailUrl}" style="margin-left:250px;" />
+ </div>
+ <div style="padding:4px;width:250px;border:1px solid
green;background:#999;">
+Age: ${My.person.age} <br />
+Gender: ${My.person.gender} <br />
+ </div>
+ </script>
+
+ <!-- ==================== CUSTOM TAG TWO - SimplePerson
=================== -->
+ <script type="text/os-template" tag="my:SimplePerson">
+ <div style="font-weight:bold;color:${My.titleColor}">Simple for
${My.person.displayName}</div>
+ <div style="padding:4px;width:250px;border:1px solid
green;background:#999;">
+ <os:Badge person="${My.person}" />
+Age: ${My.person.age} <br />
+ </div>
+ </script>
+
+ <!-- ==================== CUSTOM TAG THREE - FriendList
=================== -->
+ <script type="text/os-template" tag="my:FriendList">
+ <h2>List of Friends</h2>
+ <os:Repeat expression="${My.people}">
+ <my:SimplePerson titleColor="blue">
+ <person>${Cur}</person>
+ </my:SimplePerson>
+ </os:Repeat>
+ </script>
+
+
+
+ <script type="text/os-template">
+ <style type="text/css">
+ body{
+ background:#eee;
+ color:#222;
+ }
+ </style>
+ </script>
+ </Content>
+
+ <Content type="html" view="canvas">
+ <script type="text/os-template">
+ <h1>Tags Sample</h1>
+
+<my:ViewerData person="${vwr}" titleColor="orange" />
+
+And the Friend List <br/>
+
+<my:FriendList>
+<people>${myfriends}</people>
+</my:FriendList>
+
+<hr />
+
+
+
+ <hr style="clear:both;" />
+ </script>
+ </Content>
+
+</Module>
+
+
Added: shindig/trunk/content/gadgets/compliance-1.0/osVarTestGadget.xml
URL:
http://svn.apache.org/viewvc/shindig/trunk/content/gadgets/compliance-1.0/osVarTestGadget.xml?rev=1035182&view=auto
==============================================================================
--- shindig/trunk/content/gadgets/compliance-1.0/osVarTestGadget.xml (added)
+++ shindig/trunk/content/gadgets/compliance-1.0/osVarTestGadget.xml Mon Nov 15
08:51:24 2010
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<Module xmlns:os="http://ns.opensocial.org/2008/markup"
xmlns:myspace="http://ns.opensocial.org/2008/x"
xmlns:my="http://ns.opensocial.org/2008/z">
+ <ModulePrefs title="OsVar Test Gadget" description="Test cases on osVar"
+ thumbnail=""
+ >
+ <Require feature="opensocial-1.0"/>
+ <Require feature="opensocial-templates"/>
+ </ModulePrefs>
+ <Content type="html" view="canvas">
+ <script type="text/os-data">
+ <os:ViewerRequest key='vwr' />
+ <os:PeopleRequest key='myfriends' userid="@viewer" groupid="@friends" />
+ <os:Var key="dpVar" >I am registered with Data Pipeline</os:Var>
+ <os:Var key="jsonArrayVar" >[1,"one", "three"]</os:Var>
+ <os:Var key="jsonObjectVar" >{"id":'jsonId',"displayName":"faux
Person"}</os:Var>
+ </script>
+
+
+ <script type="text/os-template" tag="vartest:Embedded">
+<div style="border:4px solid gray;padding:4px;margin:10px;float:left;">
+vartest:Embedded tag <br/>
+<b>My.someVal:</b> ${My.someVal}
+</div>
+ </script>
+
+
+<script type="text/os-template" tag="vartest:InDefinition">
+ <os:Var key="altKey" >Built altKey contains someVal:
${My.someVal}</os:Var>
+ <div style="border:4px solid red;padding:4px;margin:10px;float:left;">
+ vartest:InDefinition tag <br/>
+ <b>altKey:</b> ${altKey}
+ </div>
+</script>
+
+<script type="text/os-template" tag="vartest:InDefinition2">
+ <os:Var key="altKey" >Built altKey contains someVal:
${My.someVal}</os:Var>
+ <div style="border:4px solid
orange;padding:4px;margin:10px;float:left;">
+ vartest:InDefinition2 tag <br/>
+ <b>altKey:</b> ${My.altKey}
+ </div>
+</script>
+
+
+
+ <script type="text/os-template">
+<h1>os:Var Test Cases</h1>
+<p>
+Testing var "foo"
+</p>
+<p>Before set: ${foo}</p>
+<os:Var key="foo" value="0" />
+<p>Initial set: ${foo}</p>
+<os:Var key="foo" >${foo + 1}</os:Var>
+<p>Added one with EL: ${foo}</p>
+
+<os:Var key="sum" value="0" />
+<h3>Looping increment to sum</h3>
+ <os:Repeat expression="${Top.myfriends}">
+<os:Var key="sum" value="${sum+1}" />
+ <div>
+ Item: ${Context.Index} is ${Cur.displayName}
+ </div>
+ </os:Repeat>
+<p>Sum: ${sum}</p>
+
+<hr />
+<h2>Custom Tags</h2>
+<vartest:Embedded someVal="Created with attr param" />
+<vartest:Embedded >
+<someVal>Created with Element Param</someVal>
+</vartest:Embedded>
+
+<vartest:Embedded >
+<os:Var key="someVal">osVar registered value</os:Var>
+</vartest:Embedded>
+
+<br style="clear:both;" />
+
+<vartest:InDefinition >
+<os:Var key="someVal">Any value will do here</os:Var>
+</vartest:InDefinition>
+
+<vartest:InDefinition2 >
+<os:Var key="someVal">Another value is good</os:Var>
+</vartest:InDefinition2>
+
+
+<br style="clear:both;" />
+<p>Deregistered altKey (should be empty): <span
id='afterDeregKey'>${altKey}</span></p>
+
+
+<hr style="clear:left;" />
+<h2>Data Pipeline variables</h2>
+string: ${dpVar}
+
+<hr />
+<h2>Json Data</h2>
+
+jsonArrayVar.length: ${jsonArrayVar.length} <br/>
+jsonArrayVar[0]: ${jsonArrayVar[0]} <br/>
+jsonArrayVar[1]: ${jsonArrayVar[1]} <br/>
+jsonArrayVar[2]: ${jsonArrayVar[2]} <br/>
+
+
+jsonObjectVar.length: ${jsonObjectVar.length} <br/>
+jsonObjectVar.id: ${jsonObjectVar.id} <br/>
+jsonObjectVar.displayName: ${jsonObjectVar.displayName} <br/>
+
+<h4>Repeating Data</h4>
+<b>jsonArrayVar</b>
+<ul>
+<li repeat="jsonArrayVar">${Cur}</li>
+</ul>
+
+<b>jsonObjectVar</b>
+<ul>
+<li repeat="jsonObjectVar">${Cur}</li>
+</ul>
+
+
+<script type="text/javascript">
+
+function testKeyDeregistration(){
+ var el = document.getElementById("afterDeregKey");
+ if(el.innerHTML.length > 0){
+ el.style.backgroundColor="red";
+ el.style.color="white";
+ }
+ else{
+ el.style.backgroundColor="#CCFFCC;";
+ }
+}
+
+
+testKeyDeregistration();
+</script>
+ </script>
+ </Content>
+</Module>
+
+
Added:
shindig/trunk/content/gadgets/compliance-1.0/ownerRequestViewerRequest.xml
URL:
http://svn.apache.org/viewvc/shindig/trunk/content/gadgets/compliance-1.0/ownerRequestViewerRequest.xml?rev=1035182&view=auto
==============================================================================
--- shindig/trunk/content/gadgets/compliance-1.0/ownerRequestViewerRequest.xml
(added)
+++ shindig/trunk/content/gadgets/compliance-1.0/ownerRequestViewerRequest.xml
Mon Nov 15 08:51:24 2010
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<Module>
+ <ModulePrefs title="Testing Owner and Viewer"
+ description="Often the values of owner and viewer will be the same"
+>
+ <Require feature="opensocial-1.0"/>
+ </ModulePrefs>
+ <Content type="html" view="canvas">
+ <script xmlns:os="http://ns.opensocial.org/2008/markup"
type="text/os-data">
+ <os:ViewerRequest key="vwr" fields="@all" />
+ <os:OwnerRequest key="owner" fields="@all" />
+ </script>
+ <script type="text/os-template">
+ <h2>Owner Viewer Request App</h2>
+
+ Viewer Name: ${vwr.displayName} <br/>
+ <p>
+ Owner Name: ${owner.displayName}
+ </p>
+
+
+ </script>
+ </Content>
+</Module>
\ No newline at end of file
Added: shindig/trunk/content/gadgets/compliance-1.0/sampleAlbumAndContents.xml
URL:
http://svn.apache.org/viewvc/shindig/trunk/content/gadgets/compliance-1.0/sampleAlbumAndContents.xml?rev=1035182&view=auto
==============================================================================
--- shindig/trunk/content/gadgets/compliance-1.0/sampleAlbumAndContents.xml
(added)
+++ shindig/trunk/content/gadgets/compliance-1.0/sampleAlbumAndContents.xml Mon
Nov 15 08:51:24 2010
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<Module xmlns:os="http://ns.opensocial.org/2008/markup" >
+ <ModulePrefs title="First photo album app" description="Media items using EL
in the data pipeline call">
+ <Require feature="opensocial-1.0"/>
+ <Require feature="opensocial-templates"/>
+ </ModulePrefs>
+ <Content type="html" view="canvas">
+ <script type="text/os-data">
+ <os:ViewerRequest key='vwr' />
+ <os:AlbumsRequest key='myalbums' userid="@viewer" groupid="@self" />
+ <os:MediaItemsRequest key='mediaItems' userid="@viewer" groupid="@self"
albumid="${myalbums[0].id}" />
+ </script>
+
+ <script type="text/os-template">
+<h1>First photos for ${vwr.displayName}</h1>
+
+<h2>Contents of album: ${myalbums[0].caption}</h2>
+
+<os:Repeat expression="${mediaItems}">
+ <div class="photo">
+ <img src="${Cur.thumbnailUrl}" />
+ Photo: ${Cur.title}
+ </div>
+</os:Repeat>
+ </script>
+ </Content>
+
+</Module>
+