Package com.vaadin

Examples of com.vaadin.Application$WindowAttachEvent


        }
    }

    public void firePortletActionRequest(Portlet portlet,
            ActionRequest request, ActionResponse response) {
        Application app = getPortletApplication(portlet);
        Set listeners = (Set) portletListeners.get(app);
        if (listeners != null) {
            for (Iterator it = listeners.iterator(); it.hasNext();) {
                PortletListener l = (PortletListener) it.next();
                l.handleActionRequest(request, response);
View Full Code Here


    public void valueUnbound(HttpSessionBindingEvent event) {
        // If we are going to be unbound from the session, the session must be
        // closing
        try {
            while (!applications.isEmpty()) {
                final Application app = applications.iterator().next();
                app.close();
                applicationToAjaxAppMgrMap.remove(app);
                removeApplication(app);
            }
        } catch (Exception e) {
            // This should never happen but is possible with rare
View Full Code Here

            return locale;
        }
        if (parent != null) {
            return parent.getLocale();
        }
        final Application app = getApplication();
        if (app != null) {
            return app.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 Application app = getApplication();
            if (app != null) {
                getWindow().setFocusedComponent((Focusable) this);
                delayedFocus = false;
            } else {
                delayedFocus = true;
View Full Code Here

    protected Application getNewApplication(HttpServletRequest request)
            throws ServletException {

        // Creates a new application instance
        try {
            final Application application = getApplicationClass().newInstance();

            return application;
        } catch (final IllegalAccessException e) {
            throw new ServletException("getNewApplication failed", e);
        } catch (final InstantiationException e) {
View Full Code Here

    public void valueUnbound(HttpSessionBindingEvent event) {
        // If we are going to be unbound from the session, the session must be
        // closing
        try {
            while (!applications.isEmpty()) {
                final Application app = applications.iterator().next();
                app.close();
                removeApplication(app);
            }
        } catch (Exception e) {
            // This should never happen but is possible with rare
            // configurations (e.g. robustness tests). If you have one
View Full Code Here

        if (value instanceof ExternalResource) {
            addAttribute(name, ((ExternalResource) value).getURL());

        } else if (value instanceof ApplicationResource) {
            final ApplicationResource r = (ApplicationResource) value;
            final Application a = r.getApplication();
            if (a == null) {
                throw new PaintException(
                        "Application not specified for resorce "
                                + value.getClass().getName());
            }
            String uri;
            if (a.getURL() != null) {
                uri = a.getURL().getPath();
            } else {
                uri = "";
            }
            if (uri.length() > 0 && uri.charAt(uri.length() - 1) != '/') {
                uri += "/";
            }
            uri += a.getRelativeLocation(r);
            addAttribute(name, uri);

        } else if (value instanceof ThemeResource) {
            final String uri = "theme://"
                    + ((ThemeResource) value).getResourceId();
View Full Code Here

        // Gets file properties
        final String filename = upload.getContentName();
        final String type = upload.getContentType();

        final Application application = getApplication();

        synchronized (application) {
            fireStarted(filename, type);
        }
View Full Code Here

    protected Application getNewApplication(HttpServletRequest request)
            throws ServletException {

        // Creates a new application instance
        try {
            final Application application = (Application) getApplicationClass()
                    .newInstance();
            return application;
        } catch (final IllegalAccessException e) {
            throw new ServletException(e);
        } catch (final InstantiationException e) {
View Full Code Here

    @Override
    protected void removeApplication(Application application) {
        portletListeners.remove(application);
        for (Iterator<Application> it = portletToApplication.values()
                .iterator(); it.hasNext();) {
            Application value = it.next();
            if (value == application) {
                // values().iterator() is backed by the map
                it.remove();
            }
        }
View Full Code Here

TOP

Related Classes of com.vaadin.Application$WindowAttachEvent

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.