That was perfect. Thanks for your help, Adam. It is working excellent now.
Steve -----Original Message----- From: Adam Winer [mailto:[email protected]] Sent: Thursday, April 16, 2009 11:38 AM To: [email protected] Subject: Re: Need Help with OpenSocial Templates and Data Pipelining A few problems, mostly from looking at the way-out-of-date opensocial-templates wiki (which was used for early design discussions). - It's os:PeopleRequest not os:PersonRequest - The xmlns:os namespace declaration needs to be on an element inside the CDATA not outside - It's userId, not id - It's "@viewer", not "VIEWER" Note that os:ViewerRequest is a simpler shorthand, and http://www.opensocial.org/Technical-Resources/opensocial-spec-v09/OpenSocial-Data-Pipelining.html is the real spec. On Thu, Apr 16, 2009 at 5:08 AM, Terlecki, Stephen <[email protected]> wrote: > I am working on implementing shindig as an opensocial container, and I > am having some trouble with os templates and data pipelining. I have > been working on a gadget definition based on the spec > (http://wiki.opensocial-templates.org/index.php?title=OpenSocial_Data_Pi > pelining) but I keep getting the same error message on the console > (Warning: Cannot resolve identifier viewer). Here is my gadget > definition: > > > > <?xml version="1.0" encoding="UTF-8"?> > > <Module> > > <ModulePrefs title="Basic Gadget"> > > <Require feature="opensocial-0.8"></Require> > > <Require feature="dynamic-height"></Require> > > <Require feature="opensocial-data"></Require> > > <Require feature="opensocial-data-context"></Require> > > <Require feature="opensocial-templates"></Require> > > <Require feature="xmlutil"></Require> > > <Optional feature="content-rewrite"> > > <Param name="include-tags"></Param> > > </Optional> > > </ModulePrefs> > > <Content type="html" xmlns:os="http://ns.opensocial.org/2008/markup"> > > <![CDATA[ > > <script type="text/os-data"> > > <os:PersonRequest key="viewer" id="VIEWER"/> > > </script> > > <script type="text/os-template"> > > <b>Hello ${viewer.displayName}</b><br> > > </script> > > ]]> > > </Content> > > </Module> > > > > The template is being displayed with just "Hello" and then nothing. > Hopefully I am just missing something silly. > > > > Also, do I need to Require all of those features? The opensocial-data > feature appears to have a dependency on opensocial-data-context , > opensocial-0.8, and xmlutil. Does that mean those features are > automatically included in my feature if I Require opensocial-data. I > couldn't find anything about the dependency tag in the gadget container > spec. > > > > (I am working on the source from the trunk in svn) > > > > If anyone has some resources I can take a look at with regards to > opensocial templates and data pipelining, that would be helpful too. > > > > Thanks > > > > Steve > > > >

