Hi there, I'm writing an OSGi and GWT/GWT-Ext based large application. The reason I need OSGi is componentization (both client and server sides), since the application is a product that could probably be extended or modified by third parties (who could develop additional bundles/ plugins and install in the OSGi platform) . I'm still in PoC phase and what I have to prove is that an incoming plugin can add UI structure (for instance, new menu items) and behavior (for instance, menu item listeners) to the running application.
I approached this having each bundle to encapsulte a new GWT/GWT-Ext module. Let's say I have two bundles/modules: the main one (B1, already installed, up and running) and the one adding features to the application (B2). These are both compiled (by GWT compiler) and packaged in a jar file (osgi standard). Their public folder (tipically www) are exposed through a HTTP server, while running in the OSGi platform. The test I did showed me that after B2 is installed and loaded, I can run any of its Javascript functions (see listing below, which I put in one B1 event handler). public static native void callHandler(String uri)/*-{ function ensureScriptIsLoaded() { if (self.fragScript) { // Already exists alert('fragment script already exists'); return; } var head = document.getElementsByTagName("head")[0]; script = document.createElement('script'); script.id = 'fragScript'; script.type = 'text/javascript'; script.src = uri; head.appendChild(script); if (self.fragScript) { alert('fragment script successfully created'); } else { alert('fragment script was not created'); } } ensureScriptIsLoaded(); anyB2ScriptFunction(); }-*/; The question is: if I have in B2 a menu item or a button with all their attributes set (iconCls, listeners, and so forth), how can I get a reference to it to add it to my panel in B1? I tried to get the reference to the component through Ext.getCmp("id") (from GWT-Ext, see below). It works if the component is in the same bundle/module but returns null otherwise. Has someone else done such a thing: modularization of GWT client-side based on OSGi bundles mechanism? Thanks in advance, Ricardo Giacomin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---