Example usage for com.vaadin.client ConnectorHierarchyChangeEvent setConnector

List of usage examples for com.vaadin.client ConnectorHierarchyChangeEvent setConnector

Introduction

In this page you can find the example usage for com.vaadin.client ConnectorHierarchyChangeEvent setConnector.

Prototype

@Override
    public void setConnector(ServerConnector connector) 

Source Link

Usage

From source file:org.vaadin.alump.offlinebuilder.client.utils.OfflineUtil.java

License:Open Source License

public static List<ComponentConnector> handleOfflineConnectorChange(OfflineContainerConnector caller,
        List<OfflineConnector> children) {
    List<ComponentConnector> componentConnectors = OfflineUtil.getComponentConnectors(children);

    ConnectorHierarchyChangeEvent event = new ConnectorHierarchyChangeEvent();
    //TODO: read old? should be empty now always anyway?
    event.setOldChildren(new ArrayList<ComponentConnector>());
    event.setParent(caller);/*from   w  ww .ja  v a  2  s  . com*/
    event.setConnector(caller);

    // First set
    caller.setChildComponents(componentConnectors);

    // Then call event
    caller.fireEvent(event);
    //caller.onConnectorHierarchyChange(event);

    return componentConnectors;
}