Example usage for com.vaadin.client ConnectorHierarchyChangeEvent setOldChildren

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

Introduction

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

Prototype

public void setOldChildren(List<ComponentConnector> oldChildren) 

Source Link

Document

Sets the collection of the old children for the connector.

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 www  .j  a va 2s  . com
    event.setConnector(caller);

    // First set
    caller.setChildComponents(componentConnectors);

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

    return componentConnectors;
}