peacess

          統(tǒng)計

          留言簿(14)

          積分與排名

          閱讀排行榜

          評論排行榜

          gwt學習--新增包(一)


          ??? 在一個gwt(google web toolkit)中,一般有一個默認的包“client”,如果我新增了一個包“l(fā)ib”應該怎么做呢?
          ??? 方法一(直接增加資源路徑):
          ??? ?? 比如你的項目名為“AX”,那么會有一個對應的文件“AX.gwt.xml”,在此文件中加入如下內容
          ??? ?? <module>
          ??? ?? ?? 。。。。。
          ?? ??? ??? <source path="lib"/>
          ??? ?? ?? 。。。。。
          ??? ??? </module>
          ??? 方法二(多重包含):
          ??? ?? 首先找到文件“AX.gwt.xml”在文件中加入對另外一個文件(比如“YY.gwt.xml”)的引用,如下
          ??? ?? 。。。。
          ??? ?? <inherits name='com.KF.YY'></inherits>
          ??? ?? 。。。。
          ??? ?? 然后在文件“YY.gwt.xml”中加入與方法一相似的代碼,如下
          ??? ?? <module>
          ?? ??? ??? <source path="lib"/>
          ??? ??? </module>
          ??? 方法三(新增包與包“client”不在同一目錄時)(參考)
          ??? ?? 這里舉一個定義組件的例子
          ??? ?? 自定義組件包為“com.gwt.components.client
          ??? ?? 在增加文件:在“com.gwt.components”下增加文件“user.gwt.xml”
          ??? ?? ?? 內容:
          <module>
          ? <inherits name="com.google.gwt.core.Core"/>
          </module>
          ??? ?? 在
          AX.gwt.xml中加入如下
          ??? ?? 。。。。
          ??? ?? <inherits name='com.gwt.components.user'></inherits>
          ??? ?? 。。。。
          ??? ?? 此時默認的會包含文件“user.gwt.xml”所在目錄下的“client”,如果在此目錄下你還有其它的目錄,就需要用文件“user.gwt.xml”中加入“<source path='你的目錄'”。

          在google的網(wǎng)站上有對“module”更專業(yè)的說明:http://code.google.com/webtoolkit/documentation/com.google.gwt.doc.DeveloperGuide.Fundamentals.Modules.html

          posted on 2006-05-27 09:06 中東 閱讀(2098) 評論(0)  編輯  收藏 所屬分類: gwt(google web toolkit)

          主站蜘蛛池模板: 南郑县| 如东县| 墨竹工卡县| 玛沁县| 札达县| 中方县| 丰镇市| 光山县| 通道| 外汇| 鄂托克前旗| 渝北区| 宁蒗| 大宁县| 长治市| 蓬莱市| 奉贤区| 肇东市| 大丰市| 宁城县| 西青区| 错那县| 昂仁县| 泌阳县| 满洲里市| 泽库县| 南丹县| 肥西县| 依安县| 琼海市| 和顺县| 望谟县| 正镶白旗| 吉木萨尔县| 永福县| 平谷区| 桦川县| 楚雄市| 沙雅县| 新竹市| 朝阳区|