user preference value not available in href through UserPref name.

0 views
Skip to first unread message

Amit

unread,
Jul 8, 2009, 7:36:24 AM7/8/09
to OpenSocial - OpenSocial and Gadgets Specification Discussion
Requirement

I have 4 applications which are deployed on GAE.
I need a simple gadget which takes a user preference String parameter,
pass it as a href value and display the application present on this
passed URL.

For this i did following:

<UserPref name="LoadThisApp" display_name="ApplicationName"
required="false" default_value="http://localhost:8083/myguestbook"/>

I provide value of LoadThisApp in href as:

<Content type="url" href="__UP_LoadThisApp__">

Now my gadget is ready.

1) i add this gadget by inserting its path in a site page, then the
gadget asks me for ApplicationName. (this would be on the page where
we setup our gadget by providing height, width)

2)The default value of ApplicationName is present here.(i.e
http://localhost:8083/myguestbook). I simply provide height, width and
click preview gadget and i can see content of http://localhost:8083/myguestbook.

Here at point 2,
-> the ApplicationName has a default value - http://localhost:8083/myguestbook
If i change this default value to another deployed application URL,
then nothing comes up. No page found errors pops up in gadget.

-> i also tried the same with removing default_value, no success.
Am i missing anything?
Guidance appreciated.

Amit

unread,
Jul 9, 2009, 3:39:34 AM7/9/09
to OpenSocial - OpenSocial and Gadgets Specification Discussion
Let me explain a little bit more .

1.) I need to use UserPref parameter (say LoadThisApp) to create my
href in the gadget.
2.) i enter a URL in userPref parameter and fetch this value in href
(like href="__UP_LoadThisApp__")

This is not working, i.e unable to load the application whose URL i
provided in userPref parameter.

Note: If i provide default_value with user pref parameter like this
<UserPref name="LoadThisApp" display_name="ApplicationName"
required="false" default_value="http://localhost:8083/myguestbook"/>
then href="__UP_LoadThisApp__"
gets its value and loads my application.


Tim Moore

unread,
Jul 9, 2009, 12:39:51 PM7/9/09
to OpenSocial - OpenSocial and Gadgets Specification Discussion
So what value is it trying to use in the cases where it's not working?

You didn't say what container you're using, but it might make sense to
post the question to a group intended to answer questions for the
specific container you're running on. This group is intended for
proposals for the specification.

Chris Chabot

unread,
Jul 9, 2009, 12:43:50 PM7/9/09
to opensocial-an...@googlegroups.com
It always helps to include a link to the proper support group :)

http://groups.google.com/group/opensocial-api/topics
Reply all
Reply to author
Forward
0 new messages