Search in sources :

Example 1 with ApplicationConfiguration

use of com.vaadin.client.ApplicationConfiguration in project flow by vaadin.

the class GwtMultipleBindingTest method gwtSetUp.

@Override
protected void gwtSetUp() throws Exception {
    super.gwtSetUp();
    Reactive.reset();
    registry = new Registry() {

        {
            set(ConstantPool.class, new ConstantPool());
            set(ExistingElementMap.class, new ExistingElementMap());
            set(ApplicationConfiguration.class, new ApplicationConfiguration());
        }
    };
    tree = new StateTree(registry) {

        @Override
        public void sendTemplateEventToServer(StateNode node, String methodName, JsArray<?> argValues, int promiseId) {
        }
    };
    node = new TestStateNode(tree);
    // populate "element data" feature to be able to bind node as a plain
    // element
    node.getMap(NodeFeatures.ELEMENT_DATA);
    element = Browser.getDocument().createElement("div");
}
Also used : ExistingElementMap(com.vaadin.client.ExistingElementMap) Registry(com.vaadin.client.Registry) ApplicationConfiguration(com.vaadin.client.ApplicationConfiguration)

Example 2 with ApplicationConfiguration

use of com.vaadin.client.ApplicationConfiguration in project flow by vaadin.

the class Bootstrapper method getConfigFromDOM.

/**
 * Constructs an ApplicationConfiguration object based on the information
 * available in the DOM.
 *
 * @param appId
 *            the application id
 * @return an application configuration object containing the read
 *         information
 */
private static ApplicationConfiguration getConfigFromDOM(String appId) {
    ApplicationConfiguration conf = new ApplicationConfiguration();
    conf.setApplicationId(appId);
    populateApplicationConfiguration(conf, getJsoConfiguration(appId));
    return conf;
}
Also used : ApplicationConfiguration(com.vaadin.client.ApplicationConfiguration)

Example 3 with ApplicationConfiguration

use of com.vaadin.client.ApplicationConfiguration in project flow by vaadin.

the class Bootstrapper method doStartApplication.

private static void doStartApplication(final String applicationId) {
    Profiler.enter("Bootstrapper.startApplication");
    ApplicationConfiguration appConf = getConfigFromDOM(applicationId);
    ApplicationConnection applicationConnection = new ApplicationConnection(appConf);
    runningApplications.push(applicationConnection);
    Profiler.leave("Bootstrapper.startApplication");
    ValueMap initialUidl = getJsoConfiguration(applicationId).getUIDL();
    applicationConnection.start(initialUidl);
}
Also used : ValueMap(com.vaadin.client.ValueMap) ApplicationConfiguration(com.vaadin.client.ApplicationConfiguration) ApplicationConnection(com.vaadin.client.ApplicationConnection)

Example 4 with ApplicationConfiguration

use of com.vaadin.client.ApplicationConfiguration in project flow by vaadin.

the class GwtEventHandlerTest method gwtSetUp.

@Override
protected void gwtSetUp() throws Exception {
    super.gwtSetUp();
    Reactive.reset();
    registry = new Registry() {

        {
            set(ConstantPool.class, new ConstantPool());
            set(ApplicationConfiguration.class, new ApplicationConfiguration());
        }
    };
    tree = new StateTree(registry) {

        @Override
        public void sendTemplateEventToServer(StateNode node, String methodName, JsArray<?> argValues, int promiseId) {
            serverMethods.put(methodName, argValues);
            serverRpcNodes.put(methodName, node);
            serverPromiseIds.put(methodName, Integer.valueOf(promiseId));
        }
    };
    node = new StateNode(0, tree);
    // populate "element data" feature to be able to bind node as a plain
    // element
    node.getMap(NodeFeatures.ELEMENT_DATA);
    element = Browser.getDocument().createElement("div");
}
Also used : Registry(com.vaadin.client.Registry) ApplicationConfiguration(com.vaadin.client.ApplicationConfiguration)

Example 5 with ApplicationConfiguration

use of com.vaadin.client.ApplicationConfiguration in project flow by vaadin.

the class GwtErrotHandlerTest method gwtSetUp.

@Override
protected void gwtSetUp() throws Exception {
    super.gwtSetUp();
    Reactive.reset();
    registry = new Registry() {

        {
            set(ApplicationConfiguration.class, new ApplicationConfiguration());
            set(SystemErrorHandler.class, new SystemErrorHandler(this));
        }
    };
}
Also used : SystemErrorHandler(com.vaadin.client.SystemErrorHandler) Registry(com.vaadin.client.Registry) ApplicationConfiguration(com.vaadin.client.ApplicationConfiguration)

Aggregations

ApplicationConfiguration (com.vaadin.client.ApplicationConfiguration)6 Registry (com.vaadin.client.Registry)4 ApplicationConnection (com.vaadin.client.ApplicationConnection)1 CustomScheduler (com.vaadin.client.CustomScheduler)1 ExistingElementMap (com.vaadin.client.ExistingElementMap)1 SystemErrorHandler (com.vaadin.client.SystemErrorHandler)1 UILifecycle (com.vaadin.client.UILifecycle)1 URIResolver (com.vaadin.client.URIResolver)1 ValueMap (com.vaadin.client.ValueMap)1 ConstantPool (com.vaadin.client.flow.ConstantPool)1 StateTree (com.vaadin.client.flow.StateTree)1