2015-08-31 2 views
0

Я использую GWT 2.5.1 прямо сейчас, и я хотел бы изменить версию SDK на 2.7.0. Я загрузил новый SDK вручную и изменил настройку SDK в свойстве проекта. Ошибки компилятор бросает в этот момент:Как обновить проект от gwt 2.5.1 до gwt 2.7.0?

ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project citikyc-core-app-web-common: Compilation failure: Compilation failure: 
[ERROR] \_ws\core-modules\core-app-modules\citikyc-core-app-web-common\src\main\java\com\citi\kyc\core\app\web\common\kycrecord\bussinessappx\client\widget\AddBusinessAppndxEditor.java:[30,35] package com.google.gwt.widget.client does not exist 
[ERROR] \_ws\core-modules\core-app-modules\citikyc-core-app-web-common\src\main\java\com\citi\kyc\core\app\web\common\kycrecord\bussinessappx\client\widget\AddBusinessAppndxEditor.java:[47,12] cannot find symbol 
[ERROR] symbol : class TextButton 
[ERROR] location: class com.citi.kyc.core.app.web.common.kycrecord.bussinessappx.client.widget.AddBusinessAppndxEditor 
[ERROR] \_ws\core-modules\core-app-modules\citikyc-core-app-web-common\src\main\java\com\citi\kyc\core\app\web\common\kycrecord\bussinessappx\client\widget\AddBusinessAppndxEditor.java:[84,25] cannot find symbol 
[ERROR] symbol : class TextButton 
[ERROR] location: class com.citi.kyc.core.app.web.common.kycrecord.bussinessappx.client.widget.AddBusinessAppndxEditor 
[ERROR] \_ws\core-modules\core-app-modules\citikyc-core-app-web-common\src\main\java\com\citi\kyc\core\app\web\common\admin\riskmodel\client\widget\ManageResponseEditor.java:[152,33] cannot find symbol 
[ERROR] symbol : constructor TreeItem(java.lang.String) 
[ERROR] location: class com.google.gwt.user.client.ui.TreeItem 
[ERROR] \_ws\core-modules\core-app-modules\citikyc-core-app-web-common\src\main\java\com\citi\kyc\core\app\web\common\admin\riskmodel\client\widget\ManageResponseEditor.java:[162,33] cannot find symbol 
[ERROR] symbol : constructor TreeItem(java.lang.String) 
[ERROR] location: class com.google.gwt.user.client.ui.TreeItem 
[ERROR] -> [Help 1] 
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project citikyc-core-app-web-common: Compilation failure 
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213) 
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) 
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) 
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) 
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) 
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) 
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) 

Вторая линия трассировки указывает на объявлении объекта TextButton класса, который импортируется из com.google.gwt.widget.client пакета в соответствии с GWT 2.5.1 структура упаковки. Но я не могу найти какой-либо подобный класс в gwt 2.7.0. Как устранить проблему?

ответ

2

Замените использование TextButton классом Button. Он имеет конструктор, который принимает либо String, либо SafeHtml для отображения в виде текста. Вы можете позже применить к нему разные стили, если хотите.

/** 
    * Creates a button with the given HTML caption. 
    * 
    * @param html the HTML caption 
    */ 
    public Button(SafeHtml html) { 
    this(html.asString()); 
    } 

    /** 
    * Creates a button with the given HTML caption. 
    * 
    * @param html the HTML caption 
    */ 
    public Button(String html) { 
    this(); 
    setHTML(html); 
    } 
Смежные вопросы