I also noticed this was an issue if you wanted to include the feature for opensocial-templates. You have to specify in the gadget xml that you want to include the opensocial-templates feature.
Aaron On Mon, Oct 8, 2012 at 1:29 PM, Christian Fischer <[email protected]>wrote: > Hello, > > this works perfect. This saves a lot of time! many thanks! > > Greets, > Christian > > Am 08.10.2012 16:58, schrieb Franklin, Matthew B.: > > -----Original Message----- >>> From: Christian Fischer >>> [mailto:c.fischer@cs-hertwig.**de<[email protected]> >>> ] >>> Sent: Monday, October 08, 2012 10:16 AM >>> To: [email protected] >>> Subject: Re: OpenAjax Hub - Widget gets no connection >>> >>> Thanks for the answer. Then, i must go deeper into shindig when it >>> parses the gadget spec. >>> >> If you really have no ability to modify the spec files and you can assume >> that EVERY gadget needs the pubsub feature, then you can override the >> default render code to always call the doOaaIframeHtml_ [1]: >> >> >> ORIGINAL: >> >> osapi.container.GadgetHolder.**prototype.render = function(gadgetInfo, >> viewParams, renderParams) { >> this.iframeId_ = osapi.container.GadgetHolder.**IFRAME_ID_PREFIX_ + >> this.site_.getId(); >> this.gadgetInfo_ = gadgetInfo; >> this.viewParams_ = viewParams; >> this.renderParams_ = renderParams; >> >> if (this.hasFeature_(gadgetInfo, 'pubsub-2')) { >> this.doOaaIframeHtml_(); >> } else { >> this.doNormalIframeHtml_(); >> } >> }; >> >> REPLACEMENT >> >> osapi.container.GadgetHolder.**prototype.render = function(gadgetInfo, >> viewParams, renderParams) { >> this.iframeId_ = osapi.container.GadgetHolder.**IFRAME_ID_PREFIX_ >> + >> this.site_.getId(); >> this.gadgetInfo_ = gadgetInfo; >> this.viewParams_ = viewParams; >> this.renderParams_ = renderParams; >> >> this.doOaaIframeHtml_(); >> }; >> >> [1] http://svn.apache.org/repos/**asf/shindig/trunk/features/** >> src/main/javascript/features/**container.site.gadget/gadget_**holder.js<http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container.site.gadget/gadget_holder.js> >> >> Greets, >>> Christian >>> >>> Am 08.10.2012 16:07, schrieb Noe-Payne, Erin A.: >>> >>>> Christian, it SHOULD be the equivalent, and for the majority of >>>> features it >>>> >>> would be. However, in the case of pubsub-2 and I want to say views, it >>> is not. >>> >>>> Shindig parses a gadget spec file and builds a metadata object >>>> including a list >>>> >>> of features that are required in the gadget. It does not look at forced >>> requires, >>> and it does not walk the dependency tree. So if the <Require >>> feature="pubsub-2"/> tag is not in the moduleprefs of the gadget, it >>> will not >>> be returned as part of the metadata object from shindig. That metadata >>> object is what informs the container whether the gadget is rendered to >>> support pubsub. >>> >>>> To my knowledge you cannot get pubsub to work without requiring directly >>>> >>> in the gadget spec. >>> >>>> -----Original Message----- >>>>> From: Christian Fischer >>>>> [mailto:c.fischer@cs-hertwig.**de<[email protected]> >>>>> ] >>>>> Sent: Monday, October 08, 2012 9:42 AM >>>>> To: [email protected] >>>>> Subject: Re: OpenAjax Hub - Widget gets no connection >>>>> >>>>> Hi Erin, >>>>> >>>>> adding the feature pubsub-2 to the forced libs isn't enough? >>>>> This SHOULD be the equivalent to <Require feature="pubsub-2"/> in each >>>>> Gadget? Isn't? >>>>> I need to add this functionality for each gadget without modifying the >>>>> source of the Gadgets. How this is otherwise possible? >>>>> >>>>> Greets, >>>>> Christian >>>>> >>>>> >>>>> Am 08.10.2012 15:29, schrieb Noe-Payne, Erin A.: >>>>> >>>>>> Hi Christian, >>>>>> >>>>>> In order for pubsub-2 to work it MUST be required in the gadget spec: >>>>>> >>>>> <Require feature="pubsub-2"/>. This is because at the time the iframe >>>>> is >>>>> rendered on the client, the container needs to do some special tricks >>>>> to >>>>> >>>> hook >>> >>>> up pubsub, and it decides whether or not to do that based on whether the >>>>> feature is require in the module prefs. Just including the source is >>>>> not >>>>> >>>> enough. >>> >>>> Let me know if that works! >>>>>> Erin >>>>>> >>>>>> -----Original Message----- >>>>>>> From: Christian Fischer >>>>>>> [mailto:c.fischer@cs-hertwig.**de<[email protected]> >>>>>>> ] >>>>>>> Sent: Monday, October 08, 2012 9:17 AM >>>>>>> To: [email protected] >>>>>>> Subject: OpenAjax Hub - Widget gets no connection >>>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> has anyone an idea why a OpenSocial Gadget gets no connection to the >>>>>>> OpenAjax Hub by assuming the following Scenario: >>>>>>> 1. Using a custom Build of Shindig and Apache RAVE, i added only a >>>>>>> new >>>>>>> Feature in the Shindig build. >>>>>>> 2. Forcing all OpenSocial Gadgets to use this new feature by adding >>>>>>> my >>>>>>> feature and the pubsub-2 feature at the end of the line >>>>>>> >>>>>>> shindig.gadget-rewrite.**default-forced-libs=core:** >>>>>>> pubsub-2:rpc:iwc-client >>>>>>> >>>>>>> in file rave.shindig.properties. >>>>>>> 3. loading the page, checking that the gadgets.Hub instance is there, >>>>>>> all fine right now. >>>>>>> 4. checking if the IfameHubClient is connected with the Hub by >>>>>>> calling >>>>>>> gadgets.Hub.isConnected() returns always *false* - except the >>>>>>> original >>>>>>> pubsub-gadgets shipped with rave/shindig - even then trying after x >>>>>>> seconds (gadgets.Hub is loaded!) >>>>>>> >>>>>>> >>>>>>> Greets & Thanks, >>>>>>> Christian >>>>>>> >>>>>> >
