On Tue, Aug 28, 2012 at 7:12 AM, Christian Fischer
<[email protected]>wrote:

> Hi all,
>
> the Holidays are over, so it's time to integrate my Code for the
> Inter-Widget-Communication-**Helper into RAVE.
>
> What i have done so far:
> apache-portal-resources -> integrated my custom JavaScript and CSS through
> the custom_js.tag and custom_css.tag. This works quite well everytime the
> Page loads :)
>
> The Problem is, that i must inject a little piece of Code into EACH Widget
> without manipulating the original widget - everytime a iframe gets loaded.
> Example:
> original Widget:
> <html><head><script src="widget_script.js"> ... </head>...</html>
>
> loaded Widget with Code-Injection:
> <html><head><script src="widget_script.js"> ... <script src="myscript.js">
> ... </head>...</html>
>
> Is this possible with RAVE? At this point, I have found nothing in the
> sources that would make it possible. I Think the only way is to use a
> custom build of wookie that injects the script for me.
> The rave-providers -> W3CWidgetRenderer just loads the List of Widgets
> from the Wookie-Store and builds the Block for the rave.registerwidget
> function (At least I think that).
>
> It would be nice if i can inject the code to all widgets when loading the
> page, whether they are OpenSocial or W3C Widgets.
>
> Has anyone suggestions for me?
> Is it possible to load a "default feature" for each widget?
>

I don't believe there is a way to do this at the moment at a Rave level. On
the OpenSocial side I'm sure you could modify one of the shindig core
features that gets loaded with every widget and add your code to that but I
don't know about the Wookie side.

>
> Thanks,
> Christian
>
>
>
> Am 15.07.2012 21:19, schrieb Scott Wilson:
>
>  On 14 Jul 2012, at 20:15, Chris Geer wrote:
>>
>>  On Sat, Jul 14, 2012 at 2:15 AM, Christian Fischer <[email protected]
>>> >wrote:
>>>
>>>  Hi all,
>>>>
>>>> i would like to get familar with the RAVE-Development because i will use
>>>> it for my master-thesis.
>>>> I'll need to extend RAVE for implementing an Inter-Widget-Communication
>>>> (IWC) Helper.
>>>> That means, i will implement a Training Environment for Widgets which
>>>> doesn't Support IWC originally.
>>>> -> Widgets without IWC schould after the Training support the IWC with
>>>> other Widgets.
>>>> (Only during the User-Session. Original Widget should NOT be modified.)
>>>>
>>>>  Thanks for your interest in Rave. We are always looking for new ways to
>>> utilize the Rave platform and hope you can share your work with the
>>> community as you go.
>>>
>>>  For that, i MUST inject some JavaScript Code into each Widget and the
>>>> Portal-Page everytime when RAVE loads a Widget from the
>>>> Wookie-Widget-Store
>>>> or from antother Store (Wookie is first enough).
>>>> We have successfully implemented a testing Environment in Apache Wookie
>>>> by
>>>> injecting some JS-Code.
>>>> Now, i want to Integrate a IWC-Training-Environment in RAVE for Mashups.
>>>> -> Is it generally possible to inject Code into widgets each time
>>>> widgets
>>>> gets Displayed?
>>>>
>>>>  It is very easy to include custom code in the container (page). All you
>>> really need to do is customize the custom_js.tag file and point to your
>>> custom javascript. This will allow access to that script from the page.
>>> As
>>> for injecting code into the widget, I'm not sure the best way to do that
>>> with Wookie. With OpenSocial gadgets, you could have a custom feature and
>>> reference it from your gadgets.
>>>
>>>  Its almost exactly the same with Wookie using custom features - there
>> are some step-by-step instructions here on how to inject JS into Wookie
>> widgets by creating a new feature spec:
>>
>> http://incubator.apache.org/**wookie/docs/developer/**features.html<http://incubator.apache.org/wookie/docs/developer/features.html>
>>
>> That should work without needing to modify anything in Rave.
>>
>>  -> Where must i start to get my Custom Code to get Loaded by RAVE each
>>>> Time widgets gets Displayed?
>>>> -> Where is my entrypoint to get famililar with the RAVE-Source Code?
>>>> (Already followed the instructions on the Webpage, Eclipse is ready to
>>>> run
>>>> with RAVE).
>>>>
>>>> The Basic Idea is to send Events from the Widgets over OpenAjax pubsub
>>>> to
>>>> the portal-Page and implement a Training Environment storing the learned
>>>> Events and Destinations in RAVE's Database according to the logged-in
>>>> user.
>>>>
>>>>  As a general note, Rave already supports OpenAjaxHub for IWC. Again,
>>> I'm
>>> not horribly familiar with the W3C widgets (Wookie) but on the OpenSocial
>>> side all you have to do is include the pubsub2 feature in your gadgets
>>> and
>>> pub/sub works like a champ. I suspect you can already do it from the
>>> Wookie
>>> side as well but someone else will have to confirm.
>>>
>> For Wookie its almost the same. Add the following line to your Widget's
>> config.xml file:
>>
>> <feature name="http://www.openajax.org/**hub<http://www.openajax.org/hub>
>> ">
>>
>> ... and you can then call "hub.publish" and "hub.subscribe" from your
>> Widget's javascript.
>>
>>
>>  Chris
>>>
>>>  Tanks for Your Help,
>>>>
>>>> Christian
>>>>
>>>>
>

Reply via email to