Settings In OpenSocial Gadgets

3 views
Skip to first unread message

rbaxter85

unread,
Jun 11, 2009, 12:22:21 PM6/11/09
to OpenSocial - OpenSocial Application Development
Hi All,

I am new to developing open social gadgets and was just trying
something really simple. I am using Shindig as my Open Social
container and have just been testing on my own machine for now. I
cannot get the settings link to show any of the UserPrefs I have added
to my gadget. I click settings and all I see is the Save and Cancel
buttons. Some of the example gadgets that come with Shindig have
preferences and they seem to work fine. When I copy the gadget xml
and run it from my server the settings don't show up anymore anymore.
Any ideas as to why this might be?

My Example:

<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="Test">
<Require feature="opensocial-0.8" />
<Require feature="setprefs"/>

</ModulePrefs>
<UserPref name="mylist" display_name="Add Search Terms"
datatype="list" required="true"/>
<Content type="html">
<![CDATA[
<iFrame frameborder="0" style="width:100%; height:100%;" src="http://
www.google.com"/>
]]>
</Content>
</Module>

Tim Moore

unread,
Jun 12, 2009, 12:57:28 PM6/12/09
to OpenSocial - OpenSocial Application Development
The UI used in the sample container shipped with Shindig is only an
example and is probably not what you want to use in a production
application. It actually relies on iGoogle's implementation, loading
an external script from gmodules.com and storing saved pref values
in
cookies. Because it's relying on Google's servers to generate the UI,
it only works for gadgets that are publicly accessible over the
internet. If you're serving it from localhost, Google won't be able
to fetch and parse it. You can use the Google Gadget Editor at
http://code.google.com/apis/gadgets/docs/tools.html#GGE to host your
spec files on gmodules.com, which allows this to work.


Real containers should generate their own UI, and provide
their own persistence mechanism.

If you just need something for development, maybe consider
the OSDE http://code.google.com/p/opensocial-development-environment/
Reply all
Reply to author
Forward
0 new messages