gadgets.Prefs is populated by the server and emitted into the gadget output
( are you actually running a shindig gadgets server when using this? see
UserPrefSubstituter.java for the intended behavior) parseUrl() is a hack for
dealing with type=url gadgets. I haven't found this to break anywhere else.

On Feb 11, 2008 1:00 PM, Paul Lindner <[EMAIL PROTECTED]> wrote:

> Hi,
>
> To get the gadgets.Prefs.* functionality working I had to add this
> line to my opensocial-0.7/feature.xml
>
>      gadgets.Prefs.parseUrl();
>
> After this is executed then the following test cases succeed:
>
>        testPrefs: function () { with(this) {
>           testhead("testPrefs");
>           var p = new gadgets.Prefs()
>           assertNotNull(p, "cannot get gadgets.Prefs()");
>
>           assertNotNull(p.getCountry());
>           assertNotEqual(p.getCountry(), 'all', 'country cannot be
> "all"');
>           testoutput("Found country: '" + p.getCountry() + "'");
>           assertEqual(p.getCountry().length, 2);
>
>           assertNotNull(p.getLang());
>           assertNotEqual(p.getLang(), 'all', 'lang cannot be "all"');
>           testoutput("Found language: '" + p.getLang() + "'");
>           assertEqual(p.getLang().length, 2);
>        }},
>
> (note this is when calling gadgets/ifr with country/lang parameters
> set.)
>
> Should we add this call to the samplecontainer too?
>
> I'm also a little confused about what how one is supposed to use
> moduelid in prefs.js...
>
> --
> Paul Lindner
> hi5 Architect
> [EMAIL PROTECTED]
>

Reply via email to