设置GWT小部件的ID
我在gwt应用程序上有一个FlowPanel对象。
FlowPanel flowPanel = new FlowPanel(); flowPanel.add(new Button("Edit")); flowPanel.add(new Button("Delete")); flowPanel.getElement().setId("idOfFlow");
它给我以下错误:
flowPanel.getElement().setId("idOfFlow") = No such instance method: 'void com.google.gwt.core.client.JavaScriptObject$.setId (java.lang.String)'
如何设置FlowPanel
的Id?
我正在使用GWT 2.4.0,这段代码工作正常。
FlowPanel panel = new FlowPanel(); panel.getElement().setId("panel-id");
要么
FlowPanel panel = new FlowPanel(); DOM.setElementProperty(panel.getElement(), "id", "panel-id");
- Eclipse + GWT – >在开发模式下内存不足
- 如何让GWT编译多个模块?
- 是否可以再调试GWT?
- Maven和GWT(以及Eclipse) – 它真的有用吗?
- 当序列化策略更改时,GWT客户端不会收到IncompatibleRemoteServiceException
- 使用GWT时找不到Firebase服务工作者(404错误)
- NoSuchMethodError:org.apache.http.conn.scheme.Scheme。(Ljava / lang / String; ILorg / apache / http / conn / scheme / SchemeSocketFactory;)V
- GWT – Intellij IDEA中GWT的GUI编辑器是什么?
- Google App Engine中的漂亮url