Aditya Raman
Aditya Raman

Reputation: 319

How to upgrade project from gwt 2.5.1 to gwt 2.7.0 ?

I am using GWT 2.5.1 right now and I would like to change my SDK version to 2.7.0. I downloaded the newest SDK manually and changed the SDK setting in project property. The errors compiler is throwing at this moment is :

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)

The second line of the trace points to a TextButton Class object declaration which is imported from com.google.gwt.widget.client package as per gwt 2.5.1 package structure. But I cant find any similar class in gwt 2.7.0. How do i fix the issue ?

Upvotes: 0

Views: 749

Answers (1)

Turbut Alin
Turbut Alin

Reputation: 2676

Replace your TextButton usages with the Button class. It has a constructor that takes either String or SafeHtml to display as a text. You can later apply different styles to it if you'd like.

/**
   * 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);
  }

Upvotes: 2

Related Questions