You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Martin Hoeller <ma...@xss.co.at> on 2012/11/15 16:13:27 UTC

How to exchange UserPrefs with shindig

Hi!

Finally I managed to use CommonContainer for rendering my gadgets (I'll
try to update the archetype and send a patch once I've cleaned up the
code). What I'd like to do next is find a way how to get the UserPrefs
from shindig and how to provide them to shindig.

I already found RenderParam.USER_PREFS. Is this the way to provide
parameters for a gadget? What object should I pass?

I also found ContainerConfig.GET_PREFERENCES. Can a method be specified
to provide UserPrefs?

Thanks in advance for your help,
- martin

Re: How to exchange UserPrefs with shindig

Posted by Henry Saputra <he...@gmail.com>.
Ah ok, then you need backend service to do that. You can wired it from
common container by setting config
param osapi.container.ContainerConfig.SET_PREFERENCES that should make call
to your backend server.

Hope this help

- Henry


On Thu, Nov 15, 2012 at 10:48 PM, Martin Hoeller <ma...@xss.co.at> wrote:

> Hi Henry!
>
> Actually I don't know. I want the user to be able to configure a gadget
> (using the <UserPref> section in the gadget's XML specification). And I
> want those settings to be persisted somehow.
>
> We already have a database for our application, so ideally there would be
> some mechanism to plugin in and communicate the preferences with shindig.
>
>
> I found some older threads on the mailinglist mentioning "services" but
> some of the mentioned classes do no exist any more and I'm afraid I'd be
> using old/deprecated APIs again (like I did with the container). So could
> you please tell me the preferred way for doing this in shindig 2.5
> (beta-4).
>
> Many thanks,
> - martin
>
> On 15 Nov 2012, Henry Saputra wrote:
>
> > Hi Martin, are you trying to push user preference dynamically when
> opening
> > a gadget?
> >
> > Otherwise you can set user pref via gadget.xml in the <UserPref> section.
> >
> > And thanks for working on the archetype to use the common container,
> really
> > appreciate it
> >
> > - Henry
> >
> >
> > On Thu, Nov 15, 2012 at 7:13 AM, Martin Hoeller <ma...@xss.co.at>
> wrote:
> >
> > > Hi!
> > >
> > > Finally I managed to use CommonContainer for rendering my gadgets (I'll
> > > try to update the archetype and send a patch once I've cleaned up the
> > > code). What I'd like to do next is find a way how to get the UserPrefs
> > > from shindig and how to provide them to shindig.
> > >
> > > I already found RenderParam.USER_PREFS. Is this the way to provide
> > > parameters for a gadget? What object should I pass?
> > >
> > > I also found ContainerConfig.GET_PREFERENCES. Can a method be specified
> > > to provide UserPrefs?
> > >
> > > Thanks in advance for your help,
> > > - martin
>

Re: How to exchange UserPrefs with shindig

Posted by Martin Hoeller <ma...@xss.co.at>.
Hi Henry!

Actually I don't know. I want the user to be able to configure a gadget
(using the <UserPref> section in the gadget's XML specification). And I
want those settings to be persisted somehow.

We already have a database for our application, so ideally there would be
some mechanism to plugin in and communicate the preferences with shindig.


I found some older threads on the mailinglist mentioning "services" but
some of the mentioned classes do no exist any more and I'm afraid I'd be
using old/deprecated APIs again (like I did with the container). So could
you please tell me the preferred way for doing this in shindig 2.5
(beta-4).

Many thanks,
- martin

On 15 Nov 2012, Henry Saputra wrote:

> Hi Martin, are you trying to push user preference dynamically when opening
> a gadget?
> 
> Otherwise you can set user pref via gadget.xml in the <UserPref> section.
> 
> And thanks for working on the archetype to use the common container, really
> appreciate it
> 
> - Henry
> 
> 
> On Thu, Nov 15, 2012 at 7:13 AM, Martin Hoeller <ma...@xss.co.at> wrote:
> 
> > Hi!
> >
> > Finally I managed to use CommonContainer for rendering my gadgets (I'll
> > try to update the archetype and send a patch once I've cleaned up the
> > code). What I'd like to do next is find a way how to get the UserPrefs
> > from shindig and how to provide them to shindig.
> >
> > I already found RenderParam.USER_PREFS. Is this the way to provide
> > parameters for a gadget? What object should I pass?
> >
> > I also found ContainerConfig.GET_PREFERENCES. Can a method be specified
> > to provide UserPrefs?
> >
> > Thanks in advance for your help,
> > - martin

Re: How to exchange UserPrefs with shindig

Posted by Henry Saputra <he...@gmail.com>.
Hi Martin, are you trying to push user preference dynamically when opening
a gadget?

Otherwise you can set user pref via gadget.xml in the <UserPref> section.

And thanks for working on the archetype to use the common container, really
appreciate it

- Henry


On Thu, Nov 15, 2012 at 7:13 AM, Martin Hoeller <ma...@xss.co.at> wrote:

> Hi!
>
> Finally I managed to use CommonContainer for rendering my gadgets (I'll
> try to update the archetype and send a patch once I've cleaned up the
> code). What I'd like to do next is find a way how to get the UserPrefs
> from shindig and how to provide them to shindig.
>
> I already found RenderParam.USER_PREFS. Is this the way to provide
> parameters for a gadget? What object should I pass?
>
> I also found ContainerConfig.GET_PREFERENCES. Can a method be specified
> to provide UserPrefs?
>
> Thanks in advance for your help,
> - martin
>