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 2012/02/22 20:05:14 UTC
Listening for view change
I¹m working on this user preferences ui. I have the need to listen for a
view change request. For example my chrome has a dropdown with all the
views supported by the gadget listed as well as a preferences view added
(even if the gadget doesn¹t support it). Now I want to know when the
preferences option is chosen.
I tried a couple of things.
1. setup a onNavigated lifecycle listener. This gets called, but since my
gadget doesn¹t have the preferences view it get a siteHolder.view of
default. Is there a way to find the originally requested view?
2. I setup a
container.config_[osapi.container.ContainerConfig.NAVIGATE_CALLBACK] (like
the SET_PREFERENCES, etc.). I must be missing something here, cuz I don¹t
seem to be getting called.
3. register a requestNavigateTo rpc function. This gets called, but only
when the gadget is requesting navigation, not my container.
Ideas on my best approach here?
doug
Re: Listening for view change
Posted by Ryan J Baxter <rj...@us.ibm.com>.
Doug, before you get to far down this path, I am not sure I personally
agree with a preferences UI implementation being included in a feature. I
think containers are going to want to customize it so much that it wont
end up being useful. I think something like a Dojo widget or a JQuery
plugin to do the same thing would be more useful. This is just my
thoughts, if others think this is useful, than disregard what I think :)
-Ryan
From: daviesd <da...@oclc.org>
To: shindig <de...@shindig.apache.org>,
Date: 02/22/2012 02:12 PM
Subject: Listening for view change
I¹m working on this user preferences ui. I have the need to listen for a
view change request. For example my chrome has a dropdown with all the
views supported by the gadget listed as well as a preferences view added
(even if the gadget doesn¹t support it). Now I want to know when the
preferences option is chosen.
I tried a couple of things.
1. setup a onNavigated lifecycle listener. This gets called, but since my
gadget doesn¹t have the preferences view it get a siteHolder.view of
default. Is there a way to find the originally requested view?
2. I setup a
container.config_[osapi.container.ContainerConfig.NAVIGATE_CALLBACK] (like
the SET_PREFERENCES, etc.). I must be missing something here, cuz I don¹t
seem to be getting called.
3. register a requestNavigateTo rpc function. This gets called, but only
when the gadget is requesting navigation, not my container.
Ideas on my best approach here?
doug