Example usage for com.vaadin.client UIDL getBooleanVariable

List of usage examples for com.vaadin.client UIDL getBooleanVariable

Introduction

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

Prototype

public boolean getBooleanVariable(String name) 

Source Link

Document

Gets the value of the named variable.

Usage

From source file:org.opennms.features.topology.ssh.internal.gwt.client.ui.VTerminal.java

License:Open Source License

/**
 * The updateFromUIDL method handles all communication from the server and passes
 * the data along to the GwtTerminal widget which updates the client side view.
 *//*ww  w  . j a  v  a 2  s  .c om*/
@Override
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {

    // This call should be made first. Ensure correct implementation,
    // and let the containing layout manage caption, etc.
    if (client.updateComponent(this, uidl, true)) {
        return;
    }

    // Save reference to server connection object to be able to send
    // user interaction later
    this.client = client;

    // Save the UIDL identifier for the component
    this.uidlId = uidl.getId();

    // Check if the server wants the TermHandler to close, if so, send a
    // response back to the server that it was closed successfully
    if (uidl.getBooleanVariable("closeClient")) {
        termHandler.close();
        isClosed = true;
        sendBytes("");
    }

    // Check if the server wants the TermHandler to update manually
    if (uidl.getBooleanVariable("update"))
        update();
    if (uidl.getBooleanVariable("focus")) {
        super.focus();
        isFocused = true;
    }

    // Take the current representation of the Terminal from the server
    // and set the Inner HTML of the widget
    dump(uidl.getStringVariable("fromSSH"));
}