Package javax.portlet

Examples of javax.portlet.WindowState


            .createPortalURL(request);
       
        // 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


       
        // 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

             * Update the portlet window state according to the action output information
             *
             * If the current node is displaying a usual layout page, also tells the page which portlet to render or not when
             * the state is maximized
             */
            WindowState state = new WindowState(getWindowStateOrDefault(navResponse));
            setNextState(uiPortlet, state);

            // update the portlet with the next mode to display
            PortletMode mode = new PortletMode(getPortletModeOrDefault(navResponse));
            setNextMode(uiPortlet, mode);
View Full Code Here

             * the state is maximized
             */
            // Note: we should only update the WindowState if the UpdateNavigationalStateResponse.getWindowState is not null,
            // otherwise it means the WindowState has not changed and we should use the current value.
            if (navStateResponse.getWindowState() != null) {
                WindowState state = new WindowState(getWindowStateOrDefault(navStateResponse));
                setNextState(uiPortlet, state);
            }

            // update the portlet with the next mode to display
            // Note: we should only update the Mode if the UpdateNavigationalStateResponse.getMode is not null,
View Full Code Here

       
        // 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

   * 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

        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

    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

            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

     * 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

TOP

Related Classes of javax.portlet.WindowState

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.