On Jan 15, 2008 7:24 AM, Martin Webb <[EMAIL PROTECTED]> wrote:

> There are (at least) three use cases for setting widget attributes:
>
> * programmatically from within the widget by invoking the appropriate API
> -
> supported already within Shindig - requires a widget developer to utilise
> * programmatically from within the container framework - supported by the
> APIs already within Shindig - requires a container developer to utilise
> * data driven from the width and title settings within the gadget XML
> whilst
> the gadget is being rendered within the container - not implemented.
>
> This last requires shindig to examine the (optional?) title and height
> settings and to use them when rendering the widget, e.g.:
>
> <ModulePrefs title="Zombies!" height="350" />


This is correct, although in practice containers are free to use or ignore
these attributes depending on their needs.

It would appear that the client-side Javascript has no direct access to the
> contents of the gadget XML?  That the gadget XML is parsed by the
> server-side implementation (the proxy?).  It would appear that the
> server-side implementation needs to provide the details of the ModulePres
> to
> the client-side implementation (possibly to the gadget.js)?


In pure js, the only way to do this is to trigger set height. In practice,
we expect that "real" containers will be using the shindig core (i.e.
everything not in the http directory) to fetch meta data, similar to what
you see on igoogle or orkut today.

We could put a hack in for the reference container that forces use of set
height, but that's not very clean either.

The best option in my mind would be to implement a reference container
servlet that uses the other libraries to render a container. This would give
support for height / width as well as the gadget's title and other meta
data. Since this is much more complicated html than the other pieces, it
would be necessary to pull a templating engine into the project such as
ClearSilver (not sure if the license is compatible or how hard integration
would be, though).

~Kevin

Reply via email to