Author: hoang_to
Date: 2009-11-01 22:02:51 -0500 (Sun, 01 Nov 2009)
New Revision: 471
Removed:
portal/trunk/web/eXoResources/src/main/webapp/WEB-INF/conf/script/
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/script/
Modified:
portal/trunk/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptDeployer.java
portal/trunk/web/eXoResources/src/main/webapp/WEB-INF/gatein-resources.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/gatein_resources_1_0.xsd
Log:
GTNPORTAL-131:Javascript deployment
Modified:
portal/trunk/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptDeployer.java
===================================================================
---
portal/trunk/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptDeployer.java 2009-11-02
01:58:21 UTC (rev 470)
+++
portal/trunk/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptDeployer.java 2009-11-02
03:02:51 UTC (rev 471)
@@ -19,9 +19,6 @@
package org.exoplatform.web.application.javascript;
-import groovy.lang.Binding;
-import groovy.lang.GroovyShell;
-
import org.exoplatform.container.PortalContainer;
import org.exoplatform.container.RootContainer.PortalContainerPostInitTask;
import org.exoplatform.services.log.ExoLogger;
@@ -88,7 +85,6 @@
{
scontext = event.getWebApp().getServletContext();
- //InputStream is =
scontext.getResourceAsStream("/WEB-INF/conf/script/groovy/JavascriptScript.groovy");
InputStream is = scontext.getResourceAsStream(GATEIN_CONFIG_RESOURCE);
if (is == null)
return;
@@ -112,7 +108,7 @@
}
catch (Exception ex)
{
- LOG.error("An error occurs while registering
'JavascriptScript.groovy' from the context '"
+ LOG.error("An error occurs while registering 'Javascript in
gatein-resources.xml' from the context '"
+ (scontext == null ? "unknown" :
scontext.getServletContextName()) + "'", ex);
}
}
@@ -124,20 +120,12 @@
InputStream is = null;
try
{
- //is =
scontext.getResourceAsStream("/WEB-INF/conf/script/groovy/JavascriptScript.groovy");
is = scontext.getResourceAsStream(GATEIN_CONFIG_RESOURCE);
- /*Binding binding = new Binding();
- binding.setVariable("JavascriptService", javascriptService);
- binding.setVariable("ServletContext", scontext);
- binding.setVariable("ServletContextName",
scontext.getServletContextName());
- binding.setVariable("PortalContainerName", container.getName());
- GroovyShell shell = new GroovyShell(binding);
- shell.evaluate(is);*/
JavascriptConfigParser.processConfigResource(is, javascriptService, scontext);
}
catch (Exception ex)
{
- LOG.error("An error occurs while processing
'JavascriptScript.groovy' from the context '"
+ LOG.error("An error occurs while processing 'Javascript in
gatein-resources.xml' from the context '"
+ scontext.getServletContextName() + "'", ex);
}
finally
Modified: portal/trunk/web/eXoResources/src/main/webapp/WEB-INF/gatein-resources.xml
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/WEB-INF/gatein-resources.xml 2009-11-02
01:58:21 UTC (rev 470)
+++ portal/trunk/web/eXoResources/src/main/webapp/WEB-INF/gatein-resources.xml 2009-11-02
03:02:51 UTC (rev 471)
@@ -119,72 +119,198 @@
</param>
</javascript>
-<!-- CORE Javascripts -->
-<javascript>
-<param><js-module>eXo.core.Utils</js-module><js-path>/javascript/eXo/core/Util.js</js-path></param>
-<param><js-module>eXo.core.DOMUtil</js-module><js-path>/javascript/eXo/core/DOMUtil.js</js-path></param>
-<param><js-module>eXo.core.Browser</js-module><js-path>/javascript/eXo/core/Browser.js</js-path></param>
-<param><js-module>eXo.core.MouseEventManager</js-module><js-path>/javascript/eXo/core/MouseEventManager.js</js-path></param>
-<param><js-module>eXo.core.UIMaskLayer</js-module><js-path>/javascript/eXo/core/UIMaskLayer.js</js-path></param>
-<param><js-module>eXo.core.Skin</js-module><js-path>/javascript/eXo/core/Skin.js</js-path></param>
-<param><js-module>eXo.core.DragDrop</js-module><js-path>/javascript/eXo/core/DragDrop.js</js-path></param>
-<param><js-module>eXo.core.DragDrop2</js-module><js-path>/javascript/eXo/core/DragDrop2.js</js-path></param>
-<param><js-module>eXo.core.Topic</js-module><js-path>/javascript/eXo/core/Topic.js</js-path></param>
-<param><js-module>eXo.core.JSON</js-module><js-path>/javascript/eXo/core/JSON.js</js-path></param>
-<param><js-module>eXo.core.Cometd</js-module><js-path>/javascript/eXo/core/Cometd.js</js-path></param>
-<param><js-module>eXo.core.Spliter</js-module><js-path>/javascript/eXo/core/Spliter.js</js-path></param>
-<param><js-module>eXo.core.Notification</js-module><js-path>/javascript/eXo/core/Notification.js</js-path></param>
-<param><js-module>eXo.core.Loader</js-module><js-path>/javascript/eXo/core/Loader.js</js-path></param>
-<param><js-module>eXo.core.I18n</js-module><js-path>/javascript/eXo/core/I18n.js</js-path></param>
-</javascript>
+ <!-- CORE Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.core.Utils</js-module>
+ <js-path>/javascript/eXo/core/Util.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.DOMUtil</js-module>
+ <js-path>/javascript/eXo/core/DOMUtil.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Browser</js-module>
+ <js-path>/javascript/eXo/core/Browser.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.MouseEventManager</js-module>
+ <js-path>/javascript/eXo/core/MouseEventManager.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.UIMaskLayer</js-module>
+ <js-path>/javascript/eXo/core/UIMaskLayer.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Skin</js-module>
+ <js-path>/javascript/eXo/core/Skin.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.DragDrop</js-module>
+ <js-path>/javascript/eXo/core/DragDrop.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.DragDrop2</js-module>
+ <js-path>/javascript/eXo/core/DragDrop2.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Topic</js-module>
+ <js-path>/javascript/eXo/core/Topic.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.JSON</js-module>
+ <js-path>/javascript/eXo/core/JSON.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Cometd</js-module>
+ <js-path>/javascript/eXo/core/Cometd.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Spliter</js-module>
+ <js-path>/javascript/eXo/core/Spliter.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Notification</js-module>
+ <js-path>/javascript/eXo/core/Notification.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Loader</js-module>
+ <js-path>/javascript/eXo/core/Loader.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.I18n</js-module>
+ <js-path>/javascript/eXo/core/I18n.js</js-path>
+ </param>
+ </javascript>
-<!-- Gadget Javascripts -->
-<javascript>
- <param>
- <js-module>eXo.gadget.UIGadget</js-module>
- <js-path>/javascript/eXo/gadget/UIGadget.js</js-path>
- </param>
-</javascript>
+ <!-- Gadget Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.gadget.UIGadget</js-module>
+ <js-path>/javascript/eXo/gadget/UIGadget.js</js-path>
+ </param>
+ </javascript>
-<!-- WebUI Javascripts -->
-<javascript>
-<param><js-module>eXo.webui.UIItemSelector</js-module><js-path>/javascript/eXo/webui/UIItemSelector.js</js-path></param>
-<param><js-module>eXo.webui.UIForm</js-module><js-path>/javascript/eXo/webui/UIForm.js</js-path></param>
-<param><js-module>eXo.webui.UIPopup</js-module><js-path>/javascript/eXo/webui/UIPopup.js</js-path></param>
-<param><js-module>eXo.webui.UIPopupSelectCategory</js-module><js-path>/javascript/eXo/webui/UIPopupSelectCategory.js</js-path></param>
-<param><js-module>eXo.webui.UIPopupWindow</js-module><js-path>/javascript/eXo/webui/UIPopupWindow.js</js-path></param>
-<param><js-module>eXo.webui.UIHorizontalTabs</js-module><js-path>/javascript/eXo/webui/UIHorizontalTabs.js</js-path></param>
-<param><js-module>eXo.webui.UIPopupMenu</js-module><js-path>/javascript/eXo/webui/UIPopupMenu.js</js-path></param>
-<param><js-module>eXo.webui.UIDropDownControl</js-module><js-path>/javascript/eXo/webui/UIDropDownControl.js</js-path></param>
-<param><js-module>eXo.webui.UIRightClickPopupMenu</js-module><js-path>/javascript/eXo/webui/UIRightClickPopupMenu.js</js-path></param>
-<param><js-module>eXo.webui.UIVerticalSlideTabs</js-module><js-path>/javascript/eXo/webui/UIVerticalSlideTabs.js</js-path></param>
-<param><js-module>eXo.webui.UIPermissionSelectorTab</js-module><js-path>/javascript/eXo/webui/UIPermissionSelectorTab.js</js-path></param>
-<param><js-module>eXo.webui.UIDashboard</js-module><js-path>/javascript/eXo/webui/UIDashboard.js</js-path></param>
-<param><js-module>eXo.webui.UIDashboardUtil</js-module><js-path>/javascript/eXo/webui/UIDashboardUtil.js</js-path></param>
-<param><js-module>eXo.webui.UINotification</js-module><js-path>/javascript/eXo/webui/UINotification.js</js-path></param>
-<param><js-module>eXo.webui.UIUserSelector</js-module><js-path>/javascript/eXo/webui/UIUserSelector.js</js-path></param>
-<param><js-module>eXo.webui.UICombobox</js-module><js-path>/javascript/eXo/webui/UICombobox.js</js-path></param>
-<param><js-module>eXo.webui.UICombobox</js-module><js-path>/javascript/eXo/webui/UIVirtualList.js</js-path></param>
-<param><js-module>eXo.webui.UIColorPicker</js-module><js-path>/javascript/eXo/webui/UIColorPicker.js</js-path></param>
-</javascript>
+ <!-- WebUI Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.webui.UIItemSelector</js-module>
+ <js-path>/javascript/eXo/webui/UIItemSelector.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIForm</js-module>
+ <js-path>/javascript/eXo/webui/UIForm.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopup</js-module>
+ <js-path>/javascript/eXo/webui/UIPopup.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopupSelectCategory</js-module>
+ <js-path>/javascript/eXo/webui/UIPopupSelectCategory.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopupWindow</js-module>
+ <js-path>/javascript/eXo/webui/UIPopupWindow.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIHorizontalTabs</js-module>
+ <js-path>/javascript/eXo/webui/UIHorizontalTabs.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopupMenu</js-module>
+ <js-path>/javascript/eXo/webui/UIPopupMenu.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIDropDownControl</js-module>
+ <js-path>/javascript/eXo/webui/UIDropDownControl.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIRightClickPopupMenu</js-module>
+ <js-path>/javascript/eXo/webui/UIRightClickPopupMenu.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIVerticalSlideTabs</js-module>
+ <js-path>/javascript/eXo/webui/UIVerticalSlideTabs.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPermissionSelectorTab</js-module>
+ <js-path>/javascript/eXo/webui/UIPermissionSelectorTab.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIDashboard</js-module>
+ <js-path>/javascript/eXo/webui/UIDashboard.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIDashboardUtil</js-module>
+ <js-path>/javascript/eXo/webui/UIDashboardUtil.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UINotification</js-module>
+ <js-path>/javascript/eXo/webui/UINotification.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIUserSelector</js-module>
+ <js-path>/javascript/eXo/webui/UIUserSelector.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UICombobox</js-module>
+ <js-path>/javascript/eXo/webui/UICombobox.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UICombobox</js-module>
+ <js-path>/javascript/eXo/webui/UIVirtualList.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIColorPicker</js-module>
+ <js-path>/javascript/eXo/webui/UIColorPicker.js</js-path>
+ </param>
+ </javascript>
-<!-- Portal Javascripts -->
-<javascript>
- <param><js-module>eXo.portal.PortalHttpRequest</js-module><js-path>/javascript/eXo/portal/PortalHttpRequest.js</js-path></param>
- <param><js-module>eXo.portal.UIPortal</js-module><js-path>/javascript/eXo/portal/UIPortal.js</js-path></param>
- <param><js-module>eXo.portal.UIWorkspace</js-module><js-path>/javascript/eXo/portal/UIWorkspace.js</js-path></param>
- <param><js-module>eXo.portal.UIPortalControl</js-module><js-path>/javascript/eXo/portal/UIPortalControl.js</js-path></param>
- <param><js-module>eXo.portal.PortalDragDrop</js-module><js-path>/javascript/eXo/portal/PortalDragDrop.js</js-path></param>
- <param><js-module>eXo.portal.UIPortalNavigation</js-module><js-path>/javascript/eXo/portal/UIPortalNavigation.js</js-path></param>
- <param><js-module>eXo.portal.UIPortalNavigation2</js-module><js-path>/javascript/eXo/portal/UIPortalNavigation2.js</js-path></param>
- <param><js-module>eXo.portal.UIMaskWorkspace</js-module><js-path>/javascript/eXo/portal/UIMaskWorkspace.js</js-path></param>
- <param><js-module>eXo.portal.UIBrowseContent</js-module><js-path>/javascript/eXo/portal/UIBrowseContent.js</js-path></param>
-</javascript>
+ <!-- Portal Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.portal.PortalHttpRequest</js-module>
+ <js-path>/javascript/eXo/portal/PortalHttpRequest.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIPortal</js-module>
+ <js-path>/javascript/eXo/portal/UIPortal.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIWorkspace</js-module>
+ <js-path>/javascript/eXo/portal/UIWorkspace.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIPortalControl</js-module>
+ <js-path>/javascript/eXo/portal/UIPortalControl.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.PortalDragDrop</js-module>
+ <js-path>/javascript/eXo/portal/PortalDragDrop.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIPortalNavigation</js-module>
+ <js-path>/javascript/eXo/portal/UIPortalNavigation.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIPortalNavigation2</js-module>
+ <js-path>/javascript/eXo/portal/UIPortalNavigation2.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIMaskWorkspace</js-module>
+ <js-path>/javascript/eXo/portal/UIMaskWorkspace.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIBrowseContent</js-module>
+ <js-path>/javascript/eXo/portal/UIBrowseContent.js</js-path>
+ </param>
+ </javascript>
-<javascript>
- <param>
- <js-module>eXo.webui.UIPortlet</js-module>
- <js-path>/javascript/eXo/webui/UIPortlet.js</js-path>
- </param>
-</javascript>
+ <javascript>
+ <param>
+ <js-module>eXo.webui.UIPortlet</js-module>
+ <js-path>/javascript/eXo/webui/UIPortlet.js</js-path>
+ </param>
+ </javascript>
</gatein-resources>
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/gatein_resources_1_0.xsd
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/gatein_resources_1_0.xsd 2009-11-02
01:58:21 UTC (rev 470)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/gatein_resources_1_0.xsd 2009-11-02
03:02:51 UTC (rev 471)
@@ -31,7 +31,7 @@
<xs:element name="portal-skin" type="portal-skin" />
<xs:element name="portlet-skin" type="portlet-skin" />
<xs:element name="window-style" type="window-style" />
- <xs:element name="script" type="script" />
+ <xs:element name="javascript" type="javascript" />
<xs:element name="resource-bundle" type="resource-bundle"
/>
</xs:sequence>
</xs:complexType>
@@ -66,9 +66,19 @@
</xs:sequence>
</xs:complexType>
- <xs:complexType name="script">
+ <xs:complexType name="javascript">
+ <xs:sequence>
+ <xs:element name="param" type="xs:param" />
+ </xs:sequence>
</xs:complexType>
+ <xs:complexType name="param">
+ <xs:sequence>
+ <xs:element name="js-module" type="xs:string" />
+ <xs:element name="js-path" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+
<xs:complexType name="resource-bundle">
</xs:complexType>
</xs:schema>
\ No newline at end of file
Show replies by date