Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-2517

GWT and test addons don't support "id" domain suffix (i.e. Indonesia)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 1.1.4.RELEASE
    • Fix Version/s: 1.1.5.RELEASE, 1.2.0.M1
    • Component/s: GWT
    • Labels:
      None

      Description

      If you create a project as follows:

      project --topLevelPackage id.foo
      persistence setup --database HYPERSONIC_IN_MEMORY --provider HIBERNATE
      entity --class ~.domain.Pizza
      field string --fieldName name
      gwt setup

      ... the following Java file is generated:

      src/main/java/id/foo/client/managed/ui/PizzaDetailsView_Roo_Gwt.java
      // WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO.
      
      package id.co.foo.client.managed.ui;
      
      import com.google.gwt.core.client.GWT;
      import com.google.gwt.dom.client.SpanElement;
      import com.google.gwt.event.dom.client.ClickEvent;
      import com.google.gwt.event.dom.client.HasClickHandlers;
      import com.google.gwt.i18n.client.DateTimeFormat;
      import com.google.gwt.i18n.client.NumberFormat;
      import com.google.gwt.uibinder.client.UiBinder;
      import com.google.gwt.uibinder.client.UiField;
      import com.google.gwt.uibinder.client.UiHandler;
      import com.google.gwt.user.client.Window;
      import com.google.gwt.user.client.ui.Composite;
      import com.google.gwt.user.client.ui.HTMLPanel;
      import com.google.gwt.user.client.ui.Widget;
      import id.co.foo.client.managed.request.PizzaProxy;
      import id.co.foo.client.scaffold.place.ProxyDetailsView;
      import id.co.foo.client.scaffold.place.ProxyListView;
      
      public abstract class PizzaDetailsView_Roo_Gwt extends Composite implements ProxyDetailsView<PizzaProxy> {
      
          @UiField
          SpanElement id;
      
          @UiField
          SpanElement version;
      
          @UiField
          SpanElement name;
      
          PizzaProxy proxy;
      
          @UiField
          SpanElement displayRenderer;
      
          public void setValue(PizzaProxy proxy) {
              this.proxy = proxy;
              id.setInnerText(proxy.getId() == null ? "" : String.valueOf(proxy.getId()));
              version.setInnerText(proxy.getVersion() == null ? "" : String.valueOf(proxy.getVersion()));
              name.setInnerText(proxy.getName() == null ? "" : String.valueOf(proxy.getName()));
              displayRenderer.setInnerText(id.co.foo.client.managed.ui.PizzaProxyRenderer.instance().render(proxy));
          }
      }

      ... in which the following line doesn't compile, because the "id" root package clashes with the ITD's "id" SpanElement field:

      displayRenderer.setInnerText(id.co.foo.client.managed.ui.PizzaProxyRenderer.instance().render(proxy));

      The workaround is to cut-and-paste the setValue method into the target Java class (in this example, PizzaDetailsView.java) and remove the package name as follows:

      PizzaDetailsView.java
      displayRenderer.setInnerText(PizzaProxyRenderer.instance().render(proxy));

        Attachments

          Activity

            People

            Assignee:
            aswan Andrew Swan
            Reporter:
            aswan Andrew Swan
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: