vaadin msg警告:试图注销
com.vaadin.ui.ConnectorTracker取消注册连接器警告:已尝试 未注册的注销(83) 这是导致此警告的代码。它用applet组件插件替换一个简单的组件 单击按钮调用appletConponent.handleClick() 小程序可以工作,但我在日志中看到警告消息vaadin msg警告:试图注销,vaadin,vaadin7,Vaadin,Vaadin7,com.vaadin.ui.ConnectorTracker取消注册连接器警告:已尝试 未注册的注销(83) 这是导致此警告的代码。它用applet组件插件替换一个简单的组件 单击按钮调用appletConponent.handleClick() 小程序可以工作,但我在日志中看到警告消息 static class AppletComponent extends CustomComponent{ Component appletComponent; VerticalLa
static class AppletComponent extends CustomComponent{
Component appletComponent;
VerticalLayout container;
String contextRoot;
void construct(){
container= new VerticalLayout();
setCompositionRoot(container);
contextRoot=VaadinServlet.getCurrent().getServletContext().getContextPath();
// initialize with empty component
container.addComponent(appletComponent= new Label());
}
void handleClick(){
addApplet();
}
}
void addApplet(){
try{
String appletParam=gatesSession.getPathParameter();
Component oldComponent=appletComponent;
Component newComponent=new AppletIntegration() {
private static final long serialVersionUID = 1L;
@Override
public void attach() {
// applet codebase,archive url
}
};
container.replaceComponent(oldComponent, newComponent);
appletComponent= newComponent;
}catch(Exception e){
logger.error(" could not create session ",e);
Notification.show("Cannot Launch ","failed"+ e.getMessage(),Type.ERROR_MESSAGE);
}
}
重写组件的
attach()
方法时,请记住调用super.attach()
:
@Override
public void attach() {
super.attach(); // Don't forget this!
}
这同样适用于重写组件的
attach()
方法时的detach()
方法,请记住调用super.attach()
:
@Override
public void attach() {
super.attach(); // Don't forget this!
}
这同样适用于
detach()
在重写的attach()方法中,您应该调用super.attach();谢谢,它解决了这个问题;谢谢,它解决了这个问题。