Package com.vaadin.server

Examples of com.vaadin.server.VaadinSession


            throws JSONException, IOException {
        StringWriter writer = new StringWriter();
        try {
            writer.write("{");

            VaadinSession session = uI.getSession();
            if (session.getConfiguration().isXsrfProtectionEnabled()) {
                writer.write(getSecurityKeyUIDL(session));
            }
            new UidlWriter().write(uI, writer, true, false);
            writer.write("}");
View Full Code Here


     * @throws JSONException
     *             If the JSON serialization fails.
     */
    public void write(UI ui, Writer writer, boolean repaintAll, boolean async)
            throws IOException, JSONException {
        VaadinSession session = ui.getSession();

        // Purge pending access calls as they might produce additional changes
        // to write out
        session.getService().runPendingAccessTasks(session);

        ArrayList<ClientConnector> dirtyVisibleConnectors = ui
                .getConnectorTracker().getDirtyVisibleConnectors();
        LegacyCommunicationManager manager = session.getCommunicationManager();
        // Paints components
        ConnectorTracker uiConnectorTracker = ui.getConnectorTracker();
        getLogger().log(Level.FINE, "* Creating response to client");

        getLogger().log(
View Full Code Here

        if (pushMode == null) {
            throw new IllegalArgumentException("Push mode cannot be null");
        }

        if (pushMode.isEnabled()) {
            VaadinSession session = ui.getSession();
            if (session != null && !session.getService().ensurePushAvailable()) {
                throw new IllegalStateException(
                        "Push is not available. See previous log messages for more information.");
            }
        }
View Full Code Here

        }
        HasComponents parent = getParent();
        if (parent != null) {
            return parent.getLocale();
        }
        final VaadinSession session = getSession();
        if (session != null) {
            return session.getLocale();
        }
        return null;
    }
View Full Code Here

    /**
     * Sets the focus for this component if the component is {@link Focusable}.
     */
    protected void focus() {
        if (this instanceof Focusable) {
            final VaadinSession session = getSession();
            if (session != null) {
                getUI().setFocusedComponent((Focusable) this);
                delayedFocus = false;
            } else {
                delayedFocus = true;
View Full Code Here

TOP

Related Classes of com.vaadin.server.VaadinSession

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.