I don't have a public accessible site, sorry.

Here's what I have now (not sure if I should be tweaking view or render
params).

    var viewParams = {};
    viewParams[osapi.container.ViewParam.VIEW] = 'home';
    var renderParams = {};
    renderParams[osapi.container.RenderParam.VIEW] = 'home';
    container.navigateGadget(gadgetSite, gadget, viewParams, renderParams);

Firebug shows me

Failed to navigate for gadget [object Object].
Failed to possibly schedule token refresh for gadget [object Object].

doug

On 9/30/11 2:52 PM, "Dan Dumont" <[email protected]> wrote:

> Hmmm.. 
> Though you can, I wouldn't start the render chain from the gadget site.
> There is important lifecycle things that happen in container.
> navigateGadget
> 
> So you verified that the key being passed in was cased properly (as the
> constant defined in RenderParam)?
> Do you have a public url that I could look at?
> 
> 
> 
> From:   daviesd <[email protected]>
> To:     <[email protected]>,
> Date:   09/30/2011 02:45 PM
> Subject:        Re: Switching views
> 
> 
> 
> Thanks Dan.  Ya, even with those suggestions I'm not getting it to switch.
> I also tried.
> 
> gadgetSite.render(gadgetSite.getActiveGadgetHolder().getGadgetInfo(), {},
> renderParams);
> 
> Just wondering what the intention is here.  For example we have a
> 'preferences' view and my gadget has a menu item that want to switch to
> that
> view.
> 
> doug
> 
> 
> On 9/30/11 2:38 PM, "Dan Dumont" <[email protected]> wrote:
> 
>> gadgetSite.container_ is a private member, I'd avoid using it.
>> I think the intention is that you would save your common container
>> instance as a global or easily accessible reference.
>> 
>> Also, params are case sensitive.  It's safest, though not always
> necessary
>> to use the constance defined in the render params object;
>> var renderParams = {}
>> renderParams[osapi.container.RenderParam.VIEW] = 'canvas';
>> ...
>> 
>> 
>> 
>> From:   daviesd <[email protected]>
>> To:     shindig <[email protected]>,
>> Date:   09/30/2011 02:32 PM
>> Subject:        Switching views
>> 
>> 
>> 
>> What is the common container way of switching the view of an already
>> rendered gadget?
>> 
>> I tried this
>> 
>>     var renderParams = { view: 'canvas' };
>>   gadgetSite.container_.navigateGadget(gadgetSite, gadget, {},
>> renderParams);
>> 
>> But it¹s not doing anything.
>> 
>> doug
>> 
>> 
>> 
> 
> 
> 
> 
> 


Reply via email to