Preferences can change in 2 ways

-A gadget sets a preference which calls an RPC listener in the
container letting the container know about the preference change
or
-A user changes a preference for the gadget in the containers UI

In either case it is up to the container to persist preferences for gadgets.

In the second case where the user sets a preference in the containers
UI the container should rerender the gadget with the new preference
values.  The OpenSocial Explorer has a pretty strait forward
implementation of this.  The ExplorerContiner [1] adds a function to
the container config that will be called when a gadget sets its
preferences.  The PreferencesDialog [2] class then notifies the
container when the preferences change which in turn causes the gadget
to rerender.

[1] 
https://github.com/OpenSocial/explorer/blob/master/opensocial-explorer-webcontent/src/main/javascript/modules/ExplorerContainer.js
[2] 
https://github.com/OpenSocial/explorer/blob/master/opensocial-explorer-webcontent/src/main/javascript/modules/widgets/gadgetarea/PreferencesDialog.js

On Wed, Oct 16, 2013 at 2:22 AM, Darren Bond <db...@globalcad.com> wrote:
> Hi Ryan,
>
> We're not sure we have preferences setup correctly. Can you kindly point us
> towards any helpful links or example code for this?
>
> Kind regards,
>
> Darren
>
> From Ryan Baxter <rbaxte...@apache.org>
> Subject Re: Gadget Window - Extends Abnormally
> Date Wed, 16 Oct 2013 01:26:09 GMT
> I have not seen either of these issues before.  The certainly could be
> issues with the gadget itself.  Do preferences with other gadgets work
> fine?
>

Reply via email to