shindig-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Allan Bond <>
Subject Re: different views in the same gadget container
Date Thu, 24 Mar 2011 21:06:06 GMT
We ended up setting a 'view' property on each of our gadgets. In addition, we 
implemented our own version of shindig.IfrGadget and changed the getIFrameUrl() 
function to set the &view parameter to gadget's view property. This way, 
whenever the container needs to repaint our gadgets, each gadget knows it's 
current view. We also have logic to change the gadget's view property when it is 
dragged to a different location in the layout.

Having done this, we aren't sure whether or not we'll really use the WIDE view. 
So we may end up with an approach similar to the one you suggested where the 
gadget just figures out what it can fit into its allocated space and dynamically 
changes its content. Thanks for the tip!

- Allan

From: Paul Lindner <>
Cc: Allan Bond <>
Sent: Mon, March 21, 2011 12:15:33 PM
Subject: Re: different views in the same gadget container

Having gone through a number of container redesigns I can only suggest that
you inform gadget authors to make their gadget deal with dynamic width.  Try
using gadgets.window.getViewportDimensions()

On Mon, Mar 21, 2011 at 8:15 AM, Allan Bond <> wrote:

> Hello,
> I am working on a gadget container that has different layout options
> (typical
> layouts like 2-column, 3-column, etc.) We plan to support several gadget
> view
> sizes ('canvas', 'home', and 'wide'). When I switch to a two-column view
> where
> Column A is maybe 2/3 of the browser width and Column B is 1/3, what is the
> preferred way to tell shindig which view each gadget should use for
> rendering?
> Currently, as each gadget is added to the page, I call
> shindig.container.setView('<view name>');
> The <view name> changes depending on the column in which the gadget
> resides. Is
> there a better or more preferred way to accomplish this? There is a
> parameter
> called viewParams, but I'm not sure how that is used (can't see it in the
> shindig gadget rendering servlet source either).
> I've looked at several OpenSocial implementations (OSEC & Eureka Streams)
> and
> they don't seem to change the view based on how wide the columns are in the
> layout. They only change the view to 'canvas' when the user maximizes a
> specific
> gadget.
> Thanks for your input.
> - Allan

Paul Lindner -- --

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message