Package org.springframework.web.portlet

Examples of org.springframework.web.portlet.ModelAndView


        }
        model.put("groups", groups);
       
        model.put("renderRequest", request);

        return new ModelAndView("constraintsView", "model", model);
 
View Full Code Here


   
  public ModelAndView handleRenderRequestInternal( RenderRequest request, RenderResponse response ) throws Exception
  {
    Map model = new HashMap();
    model.put( "list", domTreeService.getAllDOMTrees( request ) );
        return new ModelAndView( "domTreeEditList", "model", model );
  }
View Full Code Here

    Map model = new HashMap();
    model.put( "messages", portletConfig.getResourceBundle( request.getLocale() ) );
    model.put( "domTreeList", domTreeSet );
    model.put( "domNodeHelper", new DOMTreeService.DOMNodeHelper() );
   
        return new ModelAndView("domTreeView", "model", model);
 
View Full Code Here

    if (controlModel != null) {
      model.putAll(controlModel);
    }

    // Trigger rendering of the specified view, using the final model.
    return new ModelAndView(viewName, model);
  }
View Full Code Here

   * @see #setSuccessView
   * @see org.springframework.validation.Errors
   * @see org.springframework.validation.BindException#getModel
   */
  protected ModelAndView onSubmitRender(Object command, BindException errors) throws Exception {
    ModelAndView mv = onSubmitRender(command);
    if (mv != null) {
      // simplest onSubmit version implemented in custom subclass
      return mv;
    }
    else {
      // default behavior: render success view
      if (getSuccessView() == null) {
        throw new PortletException("successView isn't set");
      }
      return new ModelAndView(getSuccessView(), errors.getModel());
    }
  }
View Full Code Here

    renderRequest.setContextPath("/springtravel");
    flowExecutor.launchExecution("foo", flowInput, renderContext);
    FlowExecutionResult result = FlowExecutionResult.createPausedResult("foo", "12345");
    EasyMock.expectLastCall().andReturn(result);
    EasyMock.replay(new Object[] { flowExecutor });
    ModelAndView mv = controller.handleRender(renderRequest, renderResponse, flowHandler);
    assertNull(mv);
    EasyMock.verify(new Object[] { flowExecutor });
  }
View Full Code Here

    };
    renderRequest.setContextPath("/springtravel");
    flowExecutor.launchExecution("foo", flowInput, renderContext);
    EasyMock.expectLastCall().andThrow(flowException);
    EasyMock.replay(new Object[] { flowExecutor });
    ModelAndView mv = controller.handleRender(renderRequest, renderResponse, flowHandler);
    assertNotNull(mv);
    assertEquals("error", mv.getViewName());
    EasyMock.verify(new Object[] { flowExecutor });
  }
View Full Code Here

    handleException = true;
    PortletSession session = renderRequest.getPortletSession();
    final FlowException flowException = new FlowException("Error") {
    };
    session.setAttribute("actionRequestFlowException", flowException);
    ModelAndView mv = controller.handleRender(renderRequest, renderResponse, flowHandler);
    assertEquals("error", mv.getViewName());
  }
View Full Code Here

    model.put("link", preferences.getValue("img-link", null));
    model.put("caption", preferences.getValue("caption", null));
    model.put("subcaption", preferences.getValue("subcaption", null));
    model.put("alt", preferences.getValue("alt-text", null));
   
    return new ModelAndView("/jsp/Image/imagePortlet", model);
  }
View Full Code Here

    // window from the portlet preferences
    PortletPreferences preferences = request.getPreferences();
    model.put("url", preferences.getValue("url", null));
    model.put("height", preferences.getValue("height", null));
   
    return new ModelAndView("/jsp/IFrame/iframePortlet", model);
  }
View Full Code Here

TOP

Related Classes of org.springframework.web.portlet.ModelAndView

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.