2011-05-18 63 views
2

無法刪除此錯誤,雖然相同的代碼在其他系統上正常工作,但沒有任何工作。gwt按鈕錯誤

「com.pariter.client.Button無法在源碼包中找到檢查模塊中的繼承鏈;它可能不是繼承所需的模塊,或者模塊可能沒有正確添加源路徑條目。


從評論添加按鈕類。

package com.pariter.client;  

class Button extends com.google.gwt.user.client.ui.Button { 

      public Button(String s) { 
       super(s); 
       this.setPixelSize(100, 25); 
       this.addStyleName("button"); 
      } 
     } 

從評論

... 
    <!-- Specify the app entry point class. --> 
    <entry-point class='com.pariter.client.LoginPage'/> 

    <!-- Specify the paths for translatable code --> 
    <source path='client'/> 
    <source path='shared'/> 
</module> 

回答

0

添加入口點和源路徑章節.gwt.xml如果我沒有記錯,如果com.pariter.client.Button是不是在一個包(或子包)會發生此錯誤定義在你的.gwt.xml

檢查您的.gwt.xml。即

... 
    <entry-point class='com.pariter.AppEntryPoint'/> 

    <source path="client"/> 
... 

</module> 

[更新]

你要麼需要你的com.pariter.client.LoginPage入口點移動到com.pariter.LoginPage(因此更新.gwt.xml)或移動您的Button類的包com.pariter.client.client

+0

。 gwt.xml包含入口點和源碼路徑,但仍然出現這個錯誤 – 2011-05-18 04:24:53

+0

@ rahul.jain它與GWT模塊(無論是你的還是繼承的)有關,例如_Check繼承鏈fr你的模塊;它可能不會繼承所需的模塊,或者模塊可能沒有正確添加其源路徑條目._按鈕類是否屬於您的一個GWT模塊? – edwardsmatt 2011-05-18 04:59:34

+0

是按鈕類屬於我的模塊之一.... 類按鈕擴展com.google.gwt.user.client.ui.Button { \t公共按鈕(String s)將{ \t \t超(S); \t \t this.setPixelSize(100,25); \t \t this.addStyleName(「button」); \t} } – 2011-05-18 05:33:28