Package com.vaadin.terminal

Examples of com.vaadin.terminal.ExternalResource


                URI reportURI;
                try {
                    reportURI = loginWin.getURL().toURI();
                    URL windowURL = new URI( reportURI.getScheme(), reportURI.getUserInfo(), reportURI.getHost(), reportURI.getPort(), reportURI.getPath(), "", null ).toURL();
                    mainWin.open( new ExternalResource( windowURL ) );
                } catch( URISyntaxException e ) {
                    log.severe( Logs.get( "app.buildui.uri.syntax" ) );
                } catch( MalformedURLException e ) {
                    log.severe( Logs.get( "app.buildui.uri.malformed" ) );
                }
View Full Code Here


            }
            PortletURL actionUrl = generateActionURL(actionKey);
            if (actionUrl != null) {
                eventActionDestinationMap.put(actionKey, name);
                eventActionValueMap.put(actionKey, value);
                window.open(new ExternalResource(actionUrl.toString()));
            } else {
                // this should never happen as we already know the response is a
                // MimeResponse
                throw new IllegalStateException(
                        "Portlet events can only be sent from a portlet request");
View Full Code Here

            }
            PortletURL actionUrl = generateActionURL(actionKey);
            if (actionUrl != null) {
                sharedParameterActionNameMap.put(actionKey, name);
                sharedParameterActionValueMap.put(actionKey, value);
                window.open(new ExternalResource(actionUrl.toString()));
            } else {
                // this should never happen as we already know the response is a
                // MimeResponse
                throw new IllegalStateException(
                        "Shared parameters can only be set from a portlet request");
View Full Code Here

    public void setPortletMode(Window window, PortletMode portletMode)
            throws IllegalStateException, PortletModeException {
        if (response instanceof MimeResponse) {
            PortletURL url = ((MimeResponse) response).createRenderURL();
            url.setPortletMode(portletMode);
            window.open(new ExternalResource(url.toString()));
        } else if (response instanceof StateAwareResponse) {
            ((StateAwareResponse) response).setPortletMode(portletMode);
        } else {
            throw new IllegalStateException(
                    "Portlet mode can only be changed from a portlet request");
View Full Code Here

        c.setCaption(caption);
        return c;
    }

    public Embedded browser(String url) {
        return embedded(new ExternalResource(url), Embedded.TYPE_BROWSER, -1,
                -1);
    }
View Full Code Here

    public Embedded img(Resource imgResource) {
        return img(imgResource, -1, -1);
    }

    public Embedded img(String imgUrl, int width, int height) {
        return img(new ExternalResource(imgUrl), width, height);
    }
View Full Code Here

     * @param targetName
     * @return
     */
    public Link link(String linkText, String linkUrl, String targetName) {
        Link c = link(linkText);
        c.setResource(new ExternalResource(linkUrl));
        c.setTargetName(targetName);
        return c;
    }
View Full Code Here

            }
            PortletURL actionUrl = generateActionURL(actionKey);
            if (actionUrl != null) {
                eventActionDestinationMap.put(actionKey, name);
                eventActionValueMap.put(actionKey, value);
                window.open(new ExternalResource(actionUrl.toString()));
            } else {
                // this should never happen as we already know the response is a
                // MimeResponse
                throw new IllegalStateException(
                        "Portlet events can only be sent from a portlet request");
View Full Code Here

            }
            PortletURL actionUrl = generateActionURL(actionKey);
            if (actionUrl != null) {
                sharedParameterActionNameMap.put(actionKey, name);
                sharedParameterActionValueMap.put(actionKey, value);
                window.open(new ExternalResource(actionUrl.toString()));
            } else {
                // this should never happen as we already know the response is a
                // MimeResponse
                throw new IllegalStateException(
                        "Shared parameters can only be set from a portlet request");
View Full Code Here

    public void setPortletMode(Window window, PortletMode portletMode)
            throws IllegalStateException, PortletModeException {
        if (response instanceof MimeResponse) {
            PortletURL url = ((MimeResponse) response).createRenderURL();
            url.setPortletMode(portletMode);
            window.open(new ExternalResource(url.toString()));
        } else if (response instanceof StateAwareResponse) {
            ((StateAwareResponse) response).setPortletMode(portletMode);
        } else {
            throw new IllegalStateException(
                    "Portlet mode can only be changed from a portlet request");
View Full Code Here

TOP

Related Classes of com.vaadin.terminal.ExternalResource

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.