You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by daviesd <da...@oclc.org> on 2011/09/30 20:30:16 UTC
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
Re: Switching views
Posted by Dan Dumont <dd...@us.ibm.com>.
constants*
From: Dan Dumont/Westford/IBM@Lotus
To: dev@shindig.apache.org,
Date: 09/30/2011 02:39 PM
Subject: Re: Switching views
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 <da...@oclc.org>
To: shindig <de...@shindig.apache.org>,
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
Re: Switching views
Posted by Ryan J Baxter <rj...@us.ibm.com>.
No problem it happens to me all the time :)
-Ryan
Email: rjbaxter@us.ibm.com
Phone: 978-899-3041
developerWorks Profile
From: daviesd <da...@oclc.org>
To: <de...@shindig.apache.org>,
Date: 09/30/2011 04:17 PM
Subject: Re: Switching views
I apologize. It's Friday and my brain has already left the office. This
IS
working for me. In fact Ryan, I do not have to close the gadget site. It
navigates to the new view properly. Thanks for the help. If anything it
got me to use the osapi syntax properly, which I was not doing.
doug
On 9/30/11 4:07 PM, "daviesd" <da...@oclc.org> wrote:
> Ryan,
>
> We had created our own shindig snapshot back on 9/23 because we were
hitting a
> deadline and didn't want things to change. So I thought that might be
the
> problem. But I just synched up with the latest shindig and it's still
not
> working for me.
>
> Our old example that use to work that creates the gadgetSite with a
> non-default view is not working anymore. Let alone the switching after
the
> render.
>
> I guess if it's working for you everything is ok. I just need to figure
out
> what's changed on my end. Thanks.
>
> doug
>
>
>
>
> On 9/30/11 3:54 PM, "Ryan J Baxter" <rj...@us.ibm.com> wrote:
>
>> Yeah Dan I just tried this internally, with a sync we did yesterday
from
>> Shindig, it seems to work fine in our demo app.
>>
>> Doug, have you tried closing the gadget site before navigating to the
new
>> view? I think this is how we do it.
>>
>> -Ryan
>>
>> Email: rjbaxter@us.ibm.com
>> Phone: 978-899-3041
>> developerWorks Profile
>>
>>
>>
>> From: Dan Dumont/Westford/IBM@Lotus
>> To: dev@shindig.apache.org,
>> Date: 09/30/2011 03:51 PM
>> Subject: Re: Switching views
>>
>>
>>
>> I'll try to look into this soon. Under a deadline to get our patches
>> reviewed and delivered.
>> I'm pretty sure we have this working fine internally, I'll see what I
can
>> set up and check.
>>
>>
>>
>>
>> From: daviesd <da...@oclc.org>
>> To: <de...@shindig.apache.org>,
>> Date: 09/30/2011 03:40 PM
>> Subject: Re: Switching views
>>
>>
>>
>> Dan,
>>
>> I went back to an example we've used for a while to demonstrate
changing
>> views and it no longer works either. I wonder if something changed
>> recently
>> that broke this?
>>
>> doug
>>
>>
>> On 9/30/11 3:12 PM, "daviesd" <da...@oclc.org> wrote:
>>
>>> My bad... I wasn't passing the second parameter correctly (the gadget
>> url). I
>>> am doing it correctly now. Firebug errors go away, but the view still
>> does not
>>> change.
>>>
>>>
>>> On 9/30/11 3:04 PM, "daviesd" <da...@oclc.org> wrote:
>>>
>>>> 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" <dd...@us.ibm.com> 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 <da...@oclc.org>
>>>>> To: <de...@shindig.apache.org>,
>>>>> 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" <dd...@us.ibm.com> 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 <da...@oclc.org>
>>>>>> To: shindig <de...@shindig.apache.org>,
>>>>>> 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
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>
>>
>>
>>
>>
>>
>>
>>
Re: Switching views
Posted by daviesd <da...@oclc.org>.
I apologize. It's Friday and my brain has already left the office. This IS
working for me. In fact Ryan, I do not have to close the gadget site. It
navigates to the new view properly. Thanks for the help. If anything it
got me to use the osapi syntax properly, which I was not doing.
doug
On 9/30/11 4:07 PM, "daviesd" <da...@oclc.org> wrote:
> Ryan,
>
> We had created our own shindig snapshot back on 9/23 because we were hitting a
> deadline and didn't want things to change. So I thought that might be the
> problem. But I just synched up with the latest shindig and it's still not
> working for me.
>
> Our old example that use to work that creates the gadgetSite with a
> non-default view is not working anymore. Let alone the switching after the
> render.
>
> I guess if it's working for you everything is ok. I just need to figure out
> what's changed on my end. Thanks.
>
> doug
>
>
>
>
> On 9/30/11 3:54 PM, "Ryan J Baxter" <rj...@us.ibm.com> wrote:
>
>> Yeah Dan I just tried this internally, with a sync we did yesterday from
>> Shindig, it seems to work fine in our demo app.
>>
>> Doug, have you tried closing the gadget site before navigating to the new
>> view? I think this is how we do it.
>>
>> -Ryan
>>
>> Email: rjbaxter@us.ibm.com
>> Phone: 978-899-3041
>> developerWorks Profile
>>
>>
>>
>> From: Dan Dumont/Westford/IBM@Lotus
>> To: dev@shindig.apache.org,
>> Date: 09/30/2011 03:51 PM
>> Subject: Re: Switching views
>>
>>
>>
>> I'll try to look into this soon. Under a deadline to get our patches
>> reviewed and delivered.
>> I'm pretty sure we have this working fine internally, I'll see what I can
>> set up and check.
>>
>>
>>
>>
>> From: daviesd <da...@oclc.org>
>> To: <de...@shindig.apache.org>,
>> Date: 09/30/2011 03:40 PM
>> Subject: Re: Switching views
>>
>>
>>
>> Dan,
>>
>> I went back to an example we've used for a while to demonstrate changing
>> views and it no longer works either. I wonder if something changed
>> recently
>> that broke this?
>>
>> doug
>>
>>
>> On 9/30/11 3:12 PM, "daviesd" <da...@oclc.org> wrote:
>>
>>> My bad... I wasn't passing the second parameter correctly (the gadget
>> url). I
>>> am doing it correctly now. Firebug errors go away, but the view still
>> does not
>>> change.
>>>
>>>
>>> On 9/30/11 3:04 PM, "daviesd" <da...@oclc.org> wrote:
>>>
>>>> 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" <dd...@us.ibm.com> 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 <da...@oclc.org>
>>>>> To: <de...@shindig.apache.org>,
>>>>> 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" <dd...@us.ibm.com> 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 <da...@oclc.org>
>>>>>> To: shindig <de...@shindig.apache.org>,
>>>>>> 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
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>
>>
>>
>>
>>
>>
>>
>>
Re: Switching views
Posted by daviesd <da...@oclc.org>.
Ryan,
We had created our own shindig snapshot back on 9/23 because we were hitting
a deadline and didn't want things to change. So I thought that might be the
problem. But I just synched up with the latest shindig and it's still not
working for me.
Our old example that use to work that creates the gadgetSite with a
non-default view is not working anymore. Let alone the switching after the
render.
I guess if it's working for you everything is ok. I just need to figure out
what's changed on my end. Thanks.
doug
On 9/30/11 3:54 PM, "Ryan J Baxter" <rj...@us.ibm.com> wrote:
> Yeah Dan I just tried this internally, with a sync we did yesterday from
> Shindig, it seems to work fine in our demo app.
>
> Doug, have you tried closing the gadget site before navigating to the new
> view? I think this is how we do it.
>
> -Ryan
>
> Email: rjbaxter@us.ibm.com
> Phone: 978-899-3041
> developerWorks Profile
>
>
>
> From: Dan Dumont/Westford/IBM@Lotus
> To: dev@shindig.apache.org,
> Date: 09/30/2011 03:51 PM
> Subject: Re: Switching views
>
>
>
> I'll try to look into this soon. Under a deadline to get our patches
> reviewed and delivered.
> I'm pretty sure we have this working fine internally, I'll see what I can
> set up and check.
>
>
>
>
> From: daviesd <da...@oclc.org>
> To: <de...@shindig.apache.org>,
> Date: 09/30/2011 03:40 PM
> Subject: Re: Switching views
>
>
>
> Dan,
>
> I went back to an example we've used for a while to demonstrate changing
> views and it no longer works either. I wonder if something changed
> recently
> that broke this?
>
> doug
>
>
> On 9/30/11 3:12 PM, "daviesd" <da...@oclc.org> wrote:
>
>> My bad... I wasn't passing the second parameter correctly (the gadget
> url). I
>> am doing it correctly now. Firebug errors go away, but the view still
> does not
>> change.
>>
>>
>> On 9/30/11 3:04 PM, "daviesd" <da...@oclc.org> wrote:
>>
>>> 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" <dd...@us.ibm.com> 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 <da...@oclc.org>
>>>> To: <de...@shindig.apache.org>,
>>>> 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" <dd...@us.ibm.com> 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 <da...@oclc.org>
>>>>> To: shindig <de...@shindig.apache.org>,
>>>>> 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
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>
>
>
>
>
>
>
>
Re: Switching views
Posted by Ryan J Baxter <rj...@us.ibm.com>.
Yeah Dan I just tried this internally, with a sync we did yesterday from
Shindig, it seems to work fine in our demo app.
Doug, have you tried closing the gadget site before navigating to the new
view? I think this is how we do it.
-Ryan
Email: rjbaxter@us.ibm.com
Phone: 978-899-3041
developerWorks Profile
From: Dan Dumont/Westford/IBM@Lotus
To: dev@shindig.apache.org,
Date: 09/30/2011 03:51 PM
Subject: Re: Switching views
I'll try to look into this soon. Under a deadline to get our patches
reviewed and delivered.
I'm pretty sure we have this working fine internally, I'll see what I can
set up and check.
From: daviesd <da...@oclc.org>
To: <de...@shindig.apache.org>,
Date: 09/30/2011 03:40 PM
Subject: Re: Switching views
Dan,
I went back to an example we've used for a while to demonstrate changing
views and it no longer works either. I wonder if something changed
recently
that broke this?
doug
On 9/30/11 3:12 PM, "daviesd" <da...@oclc.org> wrote:
> My bad... I wasn't passing the second parameter correctly (the gadget
url). I
> am doing it correctly now. Firebug errors go away, but the view still
does not
> change.
>
>
> On 9/30/11 3:04 PM, "daviesd" <da...@oclc.org> wrote:
>
>> 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" <dd...@us.ibm.com> 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 <da...@oclc.org>
>>> To: <de...@shindig.apache.org>,
>>> 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" <dd...@us.ibm.com> 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 <da...@oclc.org>
>>>> To: shindig <de...@shindig.apache.org>,
>>>> 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
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>>
Re: Switching views
Posted by Dan Dumont <dd...@us.ibm.com>.
I'll try to look into this soon. Under a deadline to get our patches
reviewed and delivered.
I'm pretty sure we have this working fine internally, I'll see what I can
set up and check.
From: daviesd <da...@oclc.org>
To: <de...@shindig.apache.org>,
Date: 09/30/2011 03:40 PM
Subject: Re: Switching views
Dan,
I went back to an example we've used for a while to demonstrate changing
views and it no longer works either. I wonder if something changed
recently
that broke this?
doug
On 9/30/11 3:12 PM, "daviesd" <da...@oclc.org> wrote:
> My bad... I wasn't passing the second parameter correctly (the gadget
url). I
> am doing it correctly now. Firebug errors go away, but the view still
does not
> change.
>
>
> On 9/30/11 3:04 PM, "daviesd" <da...@oclc.org> wrote:
>
>> 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" <dd...@us.ibm.com> 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 <da...@oclc.org>
>>> To: <de...@shindig.apache.org>,
>>> 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" <dd...@us.ibm.com> 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 <da...@oclc.org>
>>>> To: shindig <de...@shindig.apache.org>,
>>>> 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
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>>
Re: Switching views
Posted by daviesd <da...@oclc.org>.
Dan,
I went back to an example we've used for a while to demonstrate changing
views and it no longer works either. I wonder if something changed recently
that broke this?
doug
On 9/30/11 3:12 PM, "daviesd" <da...@oclc.org> wrote:
> My bad... I wasn't passing the second parameter correctly (the gadget url). I
> am doing it correctly now. Firebug errors go away, but the view still does not
> change.
>
>
> On 9/30/11 3:04 PM, "daviesd" <da...@oclc.org> wrote:
>
>> 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" <dd...@us.ibm.com> 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 <da...@oclc.org>
>>> To: <de...@shindig.apache.org>,
>>> 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" <dd...@us.ibm.com> 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 <da...@oclc.org>
>>>> To: shindig <de...@shindig.apache.org>,
>>>> 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
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>>
Re: Switching views
Posted by daviesd <da...@oclc.org>.
My bad... I wasn't passing the second parameter correctly (the gadget url).
I am doing it correctly now. Firebug errors go away, but the view still does
not change.
On 9/30/11 3:04 PM, "daviesd" <da...@oclc.org> wrote:
> 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" <dd...@us.ibm.com> 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 <da...@oclc.org>
>> To: <de...@shindig.apache.org>,
>> 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" <dd...@us.ibm.com> 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 <da...@oclc.org>
>>> To: shindig <de...@shindig.apache.org>,
>>> 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
>>>
>>>
>>>
>>
>>
>>
>>
>>
Re: Switching views
Posted by daviesd <da...@oclc.org>.
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" <dd...@us.ibm.com> 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 <da...@oclc.org>
> To: <de...@shindig.apache.org>,
> 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" <dd...@us.ibm.com> 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 <da...@oclc.org>
>> To: shindig <de...@shindig.apache.org>,
>> 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
>>
>>
>>
>
>
>
>
>
Re: Switching views
Posted by Dan Dumont <dd...@us.ibm.com>.
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 <da...@oclc.org>
To: <de...@shindig.apache.org>,
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" <dd...@us.ibm.com> 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 <da...@oclc.org>
> To: shindig <de...@shindig.apache.org>,
> 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
>
>
>
Re: Switching views
Posted by daviesd <da...@oclc.org>.
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" <dd...@us.ibm.com> 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 <da...@oclc.org>
> To: shindig <de...@shindig.apache.org>,
> 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
>
>
>
Re: Switching views
Posted by Dan Dumont <dd...@us.ibm.com>.
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 <da...@oclc.org>
To: shindig <de...@shindig.apache.org>,
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