Examples of DelegateState


Examples of com.vaadin.tests.widgetset.client.DelegateState

import com.vaadin.tests.widgetset.client.DelegateState;
import com.vaadin.ui.AbstractComponent;

public class DelegateToWidgetComponent extends AbstractComponent {
    public DelegateToWidgetComponent() {
        DelegateState state = getState();
        state.value1 = "My String";
        state.renamedValue2 = 42;
        state.setValue3(Boolean.TRUE);
        state.setRenamedValue4(Math.PI);
    }
View Full Code Here

Examples of org.jasig.portal.api.portlet.DelegateState

    /* (non-Javadoc)
     * @see org.jasig.portal.api.portlet.PortletDelegationDispatcher#getDelegateState()
     */
    @Override
    public DelegateState getDelegateState() {
        return new DelegateState(this.portletWindow.getPortletMode(), this.portletWindow.getWindowState());
    }
View Full Code Here

Examples of org.jasig.portal.api.portlet.DelegateState

        //Get or create the parent portlet URL
        final IPortletWindowId parentPortletWindowId = this.parentPortletWindow.getPortletWindowId();
        final PortletUrl parentPortletUrl = new PortletUrl(parentPortletWindowId);
        this.portletDelegationManager.setParentPortletUrl(request, parentPortletUrl);
       
        final DelegateState delegateState = delegationRequest.getDelegateState();
        if (delegateState != null) {
            final IPortletWindowId portletWindowId = this.portletWindow.getPortletWindowId();
           
            //Get or create the delegate portlet URL
            PortletUrl delegatePortletUrl = this.portletRequestParameterManager.getPortletRequestInfo(request, portletWindowId);
            if (delegatePortletUrl == null) {
                delegatePortletUrl = new PortletUrl(portletWindowId);
                this.portletRequestParameterManager.setAdditionalPortletUrl(request, delegatePortletUrl);
            }
            parentPortletUrl.setDelegatePortletUrl(delegatePortletUrl);

            final PortletMode mode = delegateState.getPortletMode();
            delegatePortletUrl.setPortletMode(mode);

            final WindowState state = delegateState.getWindowState();
            delegatePortletUrl.setWindowState(state);
        }
       
        final WindowState parentWindowState = delegationRequest.getParentWindowState();
        if (parentWindowState != null) {
View Full Code Here

Examples of org.jasig.portal.api.portlet.DelegateState

        final PortletSession portletSession = renderRequest.getPortletSession();
        IPortletWindowId portletWindowId = (IPortletWindowId)portletSession.getAttribute(sessionKey);

        final PortletDelegationDispatcher portletDelegationDispatcher;
        final DelegateState delegateState;
        //No id in session, create a new dispatcher
        if (portletWindowId == null) {
            portletDelegationDispatcher = portletDelegationLocator.createRequestDispatcher(renderRequest, this.fname);
            portletWindowId = portletDelegationDispatcher.getPortletWindowId();
            portletSession.setAttribute(sessionKey, portletWindowId);

            final PortletMode portletMode = this.portletMode == null ? null : new PortletMode(this.portletMode);
            final WindowState windowState = this.windowState == null ? null : new WindowState(this.windowState);
           
            delegateState = new DelegateState(portletMode, windowState);
        }
        //id in session, get the old dispatcher
        else {
            portletDelegationDispatcher = portletDelegationLocator.getRequestDispatcher(renderRequest, portletWindowId);
            delegateState = null;
View Full Code Here

Examples of org.jasig.portal.api.portlet.DelegateState

     
      final PortletDelegationDispatcher requestDispatcher = this.portletDelegationLocator.getRequestDispatcher(actionRequest, portletWindowId);
     
      final DelegationActionResponse delegationResponse = requestDispatcher.doAction(actionRequest, actionResponse);
      final PortletUrl renderUrl = delegationResponse.getRenderUrl();
      final DelegateState delegateState = delegationResponse.getDelegateState();
        if (renderUrl == null ||
              (renderUrl.getPortletMode() != null && !IPortletAdaptor.CONFIG.equals(renderUrl.getPortletMode())) ||
              !IPortletAdaptor.CONFIG.equals(delegateState.getPortletMode())) {
         
          //The portlet sent a redirect OR changed it's mode away from CONFIG, assume it is done
          return true;
      }
     
View Full Code Here

Examples of org.jasig.portal.api.portlet.DelegateState

      final PortletDelegationDispatcher requestDispatcher = this.portletDelegationLocator.getRequestDispatcher(actionRequest, portletWindowId);
     
      final DelegationActionResponse delegationResponse = requestDispatcher.doAction(actionRequest, actionResponse);
     
      final String redirectLocation = delegationResponse.getRedirectLocation();
      final DelegateState delegateState = delegationResponse.getDelegateState();
        if (redirectLocation != null ||
              (delegationResponse.getPortletMode() != null && !IPortletRenderer.CONFIG.equals(delegationResponse.getPortletMode())) ||
              !IPortletRenderer.CONFIG.equals(delegateState.getPortletMode())) {
         
          //The portlet sent a redirect OR changed it's mode away from CONFIG, assume it is done
          return true;
      }
View Full Code Here

Examples of org.jasig.portal.api.portlet.DelegateState

        final PortletSession portletSession = renderRequest.getPortletSession();
        IPortletWindowId portletWindowId = (IPortletWindowId)portletSession.getAttribute(sessionKey);

        final PortletDelegationDispatcher portletDelegationDispatcher;
        final DelegateState delegateState;
        //No id in session, create a new dispatcher
        if (portletWindowId == null) {
            portletDelegationDispatcher = portletDelegationLocator.createRequestDispatcher(renderRequest, this.fname);
            portletWindowId = portletDelegationDispatcher.getPortletWindowId();
            portletSession.setAttribute(sessionKey, portletWindowId);

            final PortletMode portletMode = PortletUtils.getPortletMode(this.portletMode);
            final WindowState windowState = PortletUtils.getWindowState(this.windowState);
           
            delegateState = new DelegateState(portletMode, windowState);
        }
        //id in session, get the old dispatcher
        else {
            portletDelegationDispatcher = portletDelegationLocator.getRequestDispatcher(renderRequest, portletWindowId);
            delegateState = null;
View Full Code Here

Examples of org.jasig.portal.api.portlet.DelegateState

        return new DelegationResponse(this.getDelegateState());
    }

    @Override
    public DelegateState getDelegateState() {
        return new DelegateState(this.portletWindow.getPortletMode(), this.portletWindow.getWindowState());
    }
View Full Code Here

Examples of org.jasig.portal.api.portlet.DelegateState

    protected void setupDelegateRequestInfo(HttpServletRequest request, DelegationRequest delegationRequest) {
        if (delegationRequest == null) {
            return;
        }
       
        final DelegateState delegateState = delegationRequest.getDelegateState();
        if (delegateState != null) {
            final PortletMode portletMode = delegateState.getPortletMode();
            if (portletMode != null) {
                this.portletWindow.setPortletMode(portletMode);
            }
           
            final WindowState windowState = delegateState.getWindowState();
            if (windowState != null) {
                this.portletWindow.setWindowState(windowState);
            }
        }
       
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.