com.vaadin.ui.ConnectorTracker unregisterConnector WARNING: Tried to unregister (83) which is not registered
here is my code causing this warning. It does a simple component replace with applet component addon.
On click of a button calls appletConponent.handleClick()
the applet works, but I see the warning msg in the logs.
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);
}
}
When overriding component's attach()
method remember to call super.attach()
as well:
@Override
public void attach() {
super.attach(); // Don't forget this!
}
The same applies to detach()
.