Examples of WindowState


Examples of javax.portlet.WindowState

   * Détermine si l'état passé en paramètre est autorisé pour le portlet
   * @param état à tester
   * @return vrai si l'état est autorisé
   */
  public boolean isWindowStateAllowed(String state) {
    return isWindowStateAllowed(new WindowState(state));
  }
View Full Code Here

Examples of javax.portlet.WindowState

        portletURL.setPortletMode(new PortletMode(portletMode));
    } catch (PortletModeException pme) { }
   
    try {
      if (windowState!=null)
        portletURL.setWindowState(new WindowState(windowState));
    } catch (WindowStateException wse) { }
   
    try {
      if (secure!=null)
        portletURL.setSecure(new Boolean(secure));
View Full Code Here

Examples of javax.portlet.WindowState

    String portletId = portletHolder.getPortletId();
    StringBuffer sb = new StringBuffer(portletId).append("_").append("state");
    String state = request.getParameter(sb.toString());
    if (state != null) {
      try {
        WindowState windowState = new WindowState(state);
        portletHolder.setWindowState(windowState);
      } catch (WindowStateException wse){
        wse.printStackTrace();
      }
    }
View Full Code Here

Examples of javax.portlet.WindowState

            bean.setPortletMode(new PortletMode(mode));
          }
          sb = new StringBuffer(portletId).append("_").append("state");
          String state = request.getParameter(sb.toString());
          if (null != state) {
            bean.setWindowState(new WindowState(state));
          }
        }
        Portal.doRender(request, response, bean, portlet);
        Portal.doRefresh(request, response, bean, portlet);
        portletsMap.put(bean.getPortletName(), bean);
View Full Code Here

Examples of javax.portlet.WindowState

     * Returns the window state of the specified window.
     * @param windowId  the window ID.
     * @return the window state. Default to NORMAL.
     */
    public WindowState getWindowState(String windowId) {
        WindowState state = (WindowState) windowStates.get(windowId);
        if (state == null) {
            state = WindowState.NORMAL;
        }
        return state;
    }
View Full Code Here

Examples of javax.portlet.WindowState

        requiredWindowStates.add(WindowState.MAXIMIZED);
        requiredWindowStates.add(WindowState.NORMAL);
       
        for (Enumeration en = request.getPortalContext().getSupportedWindowStates();
            en.hasMoreElements(); ) {
            WindowState windowState = (WindowState) en.nextElement();
            requiredWindowStates.remove(windowState);
        }
       
        if (requiredWindowStates.isEmpty()) {
          result.setReturnCode(TestResult.PASSED);
View Full Code Here

Examples of javax.portlet.WindowState

        PortalURL portalUrl =  ctx.createPortalURL();

        // Encode window state of the current portlet in the portal URL.
        String portletId = parentTag.getEvaluatedPortletId();
        if (windowState != null) {
            portalUrl.setWindowState(portletId, new WindowState(windowState));
        }

        // Encode portlet mode of the current portlet in the portal URL.
        if (portletMode != null) {
            portalUrl.setPortletMode(portletId, new PortletMode(portletMode));
View Full Code Here

Examples of javax.portlet.WindowState

        PortalURL portalURL = portalEnv.getRequestedPortalURL();

        // Check if someone else is maximized. If yes, don't show content.
        Map windowStates = portalURL.getWindowStates();
        for (Iterator it = windowStates.values().iterator(); it.hasNext();) {
            WindowState windowState = (WindowState) it.next();
            if (WindowState.MAXIMIZED.equals(windowState)) {
                pageContext.setAttribute(var, Boolean.TRUE);
                break;
            }
        }
View Full Code Here

Examples of javax.portlet.WindowState

                throw new JspException(e);
            }
        }
        if (windowState != null) {
            try {
                WindowState state = (WindowState)
                    TEI.definedWindowStates.get(windowState.toUpperCase());
                if (state == null) {
                    state = new WindowState(windowState);
                }
                url.setWindowState(state);
            } catch (WindowStateException e) {
                throw new JspException(e);
            }
View Full Code Here

Examples of javax.portlet.WindowState

       
        // Check if someone else is maximized. If yes, don't show content.
        Map windowStates = portalURL.getWindowStates();
        for (Iterator it = windowStates.keySet().iterator(); it.hasNext(); ) {
            String windowId = (String) it.next();
            WindowState windowState = (WindowState) windowStates.get(windowId);
            if (WindowState.MAXIMIZED.equals(windowState)
                && !window.getId().getStringId().equals(windowId)) {
                return SKIP_BODY;
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.