Exemplo n.º 1
0
 /**
  * Receive any contributions.
  *
  * <p>We need to know when to remove the component so we need a map from the factory to the
  * instance so that when the factory is unregistered, we can dispose it.
  *
  * @param factory The DS Component Factory that can make, well, ehh, components.
  */
 @Reference(type = '*', target = "(component.factory=com.vaadin.Component/contribution)")
 protected void setContribution(ComponentFactory factory) {
   ComponentInstance ci = factory.newInstance(null);
   Component c = (Component) ci.getInstance();
   synchronized (this) {
     tabs.addTab(c);
     mapping.put(factory, ci);
   }
 }