Example usage for com.vaadin.client ConnectorHierarchyChangeEvent ConnectorHierarchyChangeEvent

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

Introduction

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

Prototype

public ConnectorHierarchyChangeEvent() 

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 ww w . ja v  a2s  . c o  m
    event.setConnector(caller);

    // First set
    caller.setChildComponents(componentConnectors);

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

    return componentConnectors;
}