« Back

OpenSocial Gadgets: Custom Preferences UI

July 1, 2010 By Michael Young

 In an earlier post I demonstrated how to add OpenSocial Gadgets as first-class citizens within Liferay. In this post I'd like to show you how  we have created a custom preferences UI.

This sample gadget has three preferences: pref1, pref2, and pref3.

 

<?xml version="1.0" encoding="UTF-8" ?>

<Module>

<ModulePrefs title="Multiple SetPref - Iframe">

  <Require feature="setprefs"/>

</ModulePrefs>

<UserPref name="pref1"

          datatype="string"

          default_value="0" />

<UserPref name="pref2"

          datatype="string"

          default_value="0" />

<UserPref name="pref3"

          datatype="string"

          default_value="0" />

<Content type="html">

...

</Content>

</Module>

To access our custom preference UI, go to "Configuration" :

 

Showing 2 Comments

sanju .
7/16/10 2:44 AM

cool

5/5/11 8:59 AM

[...] Standard portlet URLs are anything but succinct.... [...] Read More