Package com.vaadin.server

Examples of com.vaadin.server.VaadinPortletRequest


    public VaadinPortletSession getSession() {
        return (VaadinPortletSession) super.getSession();
    }

    private void possiblyChangedModeOrState() {
        VaadinPortletRequest request = (VaadinPortletRequest) VaadinPortletService
                .getCurrentRequest();

        userAgent.setValue(getPage().getWebBrowser().getBrowserApplication());
        screenWidth.setValue(String.valueOf(getPage().getBrowserWindowWidth()));
        screenHeight.setValue(String
                .valueOf(getPage().getBrowserWindowHeight()));

        boolean inViewMode = (request.getPortletMode() == PortletMode.VIEW);
        boolean inNormalState = (request.getWindowState() == WindowState.NORMAL);
        // Portlet up-and-running, enable stuff
        portletEdit.setEnabled(true);
        portletMax.setEnabled(true);

        // Editable if we're in editmode
        tf.setEnabled(!inViewMode);

        // Show notification about current mode and state
        getPage().showNotification(
                new Notification("Portlet status", "Mode: "
                        + request.getPortletMode() + " State: "
                        + request.getWindowState(), Type.WARNING_MESSAGE));

        // Display current user info
        Map<?, ?> uinfo = (Map<?, ?>) request
                .getAttribute(PortletRequest.USER_INFO);
        if (uinfo != null) {
            String s = "";
            for (Iterator<?> it = uinfo.keySet().iterator(); it.hasNext();) {
                Object key = it.next();
                Object val = uinfo.get(key);
                s += key + ": " + val + "\n";
            }
            if (request.isUserInRole("administrator")) {
                s += "(administrator)";
            }
            userInfo.setValue(s);
        } else {
            userInfo.setValue("-");
View Full Code Here


    protected JsonObject getApplicationParameters(BootstrapContext context)
            throws PaintException {
        JsonObject parameters = super.getApplicationParameters(context);
        VaadinPortletResponse response = (VaadinPortletResponse) context
                .getResponse();
        VaadinPortletRequest request = (VaadinPortletRequest) context
                .getRequest();
        MimeResponse portletResponse = (MimeResponse) response
                .getPortletResponse();
        ResourceURL resourceURL = portletResponse.createResourceURL();
        resourceURL.setResourceID("v-browserDetails");
View Full Code Here

    protected JSONObject getApplicationParameters(BootstrapContext context)
            throws JSONException, PaintException {
        JSONObject parameters = super.getApplicationParameters(context);
        VaadinPortletResponse response = (VaadinPortletResponse) context
                .getResponse();
        VaadinPortletRequest request = (VaadinPortletRequest) context
                .getRequest();
        MimeResponse portletResponse = (MimeResponse) response
                .getPortletResponse();
        ResourceURL resourceURL = portletResponse.createResourceURL();
        resourceURL.setResourceID("v-browserDetails");
View Full Code Here

TOP

Related Classes of com.vaadin.server.VaadinPortletRequest

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.