jboss gatein merge.js给出了错误

时间:2013-10-01 05:55:59

标签: extjs jboss gatein

我在我的网络应用程序中使用jboss gatein 3.2。在gatein-resource.xml中,我已经从ext-js 3.2升级到3.4。这给了我firebug控制台中的java脚本错误,并且所有ext-js组件和gatein portlet的菜单都没有加载。这仅在生产模式下发生,但在开发模式下工作正常。可能有什么问题(ext-js 3.2在开发模式和生产模式下都能正常工作)

TypeError: eXo.portal.UIPortal is undefined

下面是我的gatein resource.xml

<?xml version="1.0" encoding="UTF-8"?>
<gatein-resources
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_resources_1_1 http://www.gatein.org/xml/ns/gatein_resources_1_1"
    xmlns="http://www.gatein.org/xml/ns/gatein_resources_1_1">

    <javascript>          
         <param>
            <js-module>extbaseJS</js-module>
            <js-path>/javascript/lib/ext-2.1/adapter/ext/ext-base.js</js-path>
            <js-priority>1</js-priority>
         </param>
         <param>
            <js-module>extallJS</js-module>
            <js-path>/javascript/lib/ext-2.1/ext-all.js</js-path>
            <js-priority>2</js-priority>
         </param>
         <param>
            <js-module>extcommonsJS</js-module>
            <js-path>/javascript/commons/extCommons.js</js-path>
            <js-priority>3</js-priority>
         </param>
          <param>
            <js-module>dateJS</js-module>
            <js-path>/javascript/date/date.js</js-path>
            <js-priority>2</js-priority>
         </param>
         <param>
            <js-module>extcalendarJS</js-module>
            <js-path>/javascript/commons/extcalendar.js</js-path>
            <js-priority>2</js-priority>
         </param>
       <param>
            <js-module>cismstableJS</js-module>
            <js-path>/javascript/tables/cismstable.js</js-path>
            <js-priority>1</js-priority>
         </param>
          <param>
            <js-module>viewJS</js-module>
            <js-path>/javascript/tables/view.js</js-path>
            <js-priority>1</js-priority>
         </param> 
         <param>
            <js-module>validationJS</js-module>
            <js-path>/javascript/commons/validation.js</js-path>
            <js-priority>1</js-priority>
         </param>
         <param>
            <js-module>commonslookupJS</js-module>
            <js-path>/javascript/commons/commons-lookup.js</js-path>
            <js-priority>1</js-priority>
         </param>

        <!--  <param>
            <js-module>fusionChartsJS</js-module>
            <js-path>/javascript/charts/FusionCharts.js</js-path>
            <js-priority>1</js-priority>
         </param>
          <param>
            <js-module>securityCharts</js-module>
            <js-path>/javascript/charts/securityChart.js</js-path>
            <js-priority>1</js-priority>
         </param> -->
         <param>
            <js-module>DwrProxy</js-module>
            <js-path>/javascript/lib/DwrProxy.js</js-path>
            <js-priority>4</js-priority>
         </param>
          <param>
            <js-module>dynamicColumn</js-module>
            <js-path>/javascript/commons/dynamicColumn.js</js-path>
            <js-priority>5</js-priority>
         </param>
         <param>
            <js-module>dateUtils</js-module>
            <js-path>/javascript/date/dateUtils.js</js-path>
            <js-priority>2</js-priority>
         </param>
         <param>
            <js-module>extObjectPopup</js-module>
            <js-path>/javascript/extWidgets/extObjectPopup/extObjectPopup.js</js-path>
            <js-priority>5</js-priority>
         </param>
          <param>
            <js-module>Spotlight</js-module>
            <js-path>/javascript/lib/ext-2.1/Spotlight.js</js-path>
            <js-priority>5</js-priority>
         </param>
         <param>
            <js-module>ExtColumnHeader</js-module>
            <js-path>/javascript/lib/ext-2.1/ColumnHeaderGroup.js</js-path>
            <js-priority>5</js-priority>
         </param>
          <param>
            <js-module>toolTreeTrends</js-module>
            <js-path>/javascript/dtree/toolTreeTrends.js</js-path>
            <js-priority>6</js-priority>
         </param>
         <param>
            <js-module>toolTreeThreat</js-module>
            <js-path>/javascript/dtree/toolTree.js</js-path>
            <js-priority>4</js-priority>
         </param>
         <param>
            <js-module>dynamicColumn</js-module>
            <js-path>/javascript/commons/dropdownGrid.js</js-path>
            <js-priority>6</js-priority>
         </param>
         <param>
            <js-module>rgraph</js-module>
            <js-path>/javascript/charts/RGraph.common.core.js</js-path>
            <js-priority>6</js-priority>
         </param>
         <param><!--RIMS_05.05_M1_BUG_35 -->
            <js-module>BarChart</js-module>
            <js-path>/javascript/charts/BarChart.js</js-path>
            <js-priority>1</js-priority>
         </param>
         <param><!--RIMS_05.05_M1_BUG_36 -->
            <js-module>LineChart</js-module>
            <js-path>/javascript/charts/LineChart.js</js-path>
            <js-priority>1</js-priority>
         </param>
    </javascript>

</gatein-resources>

2 个答案:

答案 0 :(得分:0)

在最新版本的Gate In(Gate In 3.6)中,他们更改了gatein-resources.xml和资源压缩机制中的javascript导入语法。您可以从This Link

找到更多相关信息

答案 1 :(得分:0)

您需要更新gatein-resources.xml以符合新语法:

  <scripts>
    <name>extJS</name>
    <script>
      <path>/javascript/lib/ext-2.1/adapter/ext/ext-base.js</path>
    </script>
    <script>
      <path>/javascript/lib/ext-2.1/ext-all.js</path>
    </script>
    .....
  </scripts>

GateIn 3.6现在提供按需,灵活和并行加载的JavaScript资源。所以你也可以使用AMD(异步模块定义)。 对于共享范围(Gatein支持门户,portlet和共享范围),您可以像这样定义javascript模块:

<module>
  <name>extbase</name>
  <script>
    <path>/javascript/lib/ext-2.1/adapter/ext/ext-base.js</path>
  </script>
  <depends>
    <module>base</module>
  </depends>
</module>
<module>
  <name>extall</name>
  <script>
    <path>/javascript/lib/ext-2.1/ext-all.js</path>
  </script>
  <depends>
    <module>extbase</module>
  </depends>
</module> 
....

您可以在此处找到有关GateIn中Javascript开发的更多信息: https://docs.jboss.org/author/display/GTNPORTAL35/JavaScript+Development