如何向VerticalPanel添加一个侦听器/处理程序,以便在VerticalPanel大小改变时触发它?
我基本上尝试过以下方法:
VerticalPanel myPanel = new VerticalPanel();
//... code to add child widgets that may change the size of the parent vertical panel ...
myPanel.addHandler(new ResizeHandler() {
public void onResize(final ResizeEvent event) {
//... code to handle resize of vertical panel ...
}
}, ResizeEvent.getType() );
Run Code Online (Sandbox Code Playgroud)
但处理程序不会被触发.
有没有办法在GWT中使用UTF-8编码String?换句话说,是否存在与java.net.URLEncoder.encode(toEncode,"UTF-8")兼容的GWT?
GWT 1.7是否支持Class.getSimpleName()?
我目前使用的是1.6,它不支持这种方法.
http://code.google.com/p/google-web-toolkit/issues/detail?id=3404表示已修复但尚未发布,但状态可能暂时未更新.
我可以通过操作轻松地自己复制它Class.getName(),但如果GWT 1.7支持这种方法,那么我将升级到它.