You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Ryan Baxter <rb...@gmail.com> on 2013/08/01 03:34:09 UTC

Re: Replacement for iGoogle gadgetsettings

Maybe I am wrong here, but this pattern is very common in different
Shindig features.

  function init(config) {

    features = config['core.util'] || {};

  }


  if (gadgets.config) {

    gadgets.config.register('core.util', null, init);

  }

Basically you register a config listener so that when the container
config (container.js) is ready your listener will be called and the
parameter passed to your listener is the container config.  You should
then be able to pull out various parameters from the config.

On Mon, Jul 29, 2013 at 8:53 AM, Charl van Niekerk
<c....@utwente.nl> wrote:
> On Thu, Jul 18, 2013 at 05:02:10PM -0400, Ryan Baxter wrote:
>> Items from container.js (container configuration) can be access from
>> features.  Take a look at the core.config feature and the other
>> features that use it.
>
> I spent a couple of hours on this but I have to admit that I am completely lost on this one.
>
> I would assume I only need to do the following (or something similar):
>
> gadgets.config.get('gadgets.uri.servlet')
>
> The only call I could find to gadgets.config.get is in xhrwrapper.js and that is to get shindig.xhrwrapper. This is also not being set in container.js
>
> I grepped some of the other settings in container.js but they only seem to be read from Java code (not JavaScript).
>
> I'm also not sure which setting(s) to use. There are settings like gadgets.jsUriTemplate, gadgets.uri.js.host and gadgets.uri.js.path but they seem to be for static JavaScript includes.
>
> There's defaultShindigProxyConcatAuthority which looks more like what I need.
>
> I can't see how this could be this difficult. Perhaps I am missing something obvious?
>
> Best Regards,
> Charl
>
> --
> Charl van Niekerk
> ICT Service Centre
> University of Twente