Spring Framework ModelAndViewDefiningException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework ModelAndViewDefiningException class.

This code example shows how to use the following methods:
			return orderForm; 
		} 
		else { 
			ModelAndView modelAndView = new ModelAndView("Error"); 
			modelAndView.addObject("message", "An order could not be created because a cart could not be found."); 
			throw new ModelAndViewDefiningException(modelAndView); 
		} 
	} 
 
	protected void onBindAndValidate(HttpServletRequest request, Object command, BindException errors, int page) { 
		if (page == 0 && request.getParameter("shippingAddressRequired") == null) { 
			OrderForm orderForm = (OrderForm) command; 
			orderForm.setShippingAddressRequired(false); 
		} 
	} 
 
	protected Map referenceData(HttpServletRequest request, int page) { 
		if (page == 0) { 
			List creditCardTypes = new ArrayList(); 
			creditCardTypes.add("Visa"); 
3
CodeRank
This code example shows how to use the following methods:
			currentStatus = UserSessionStatus.AUTHENTICATED; 
		} 
		 
		// Status equality check 
		if (currentStatus != getDesiredStatus()) { 
			throw new ModelAndViewDefiningException(new ModelAndView("redirect:" + getAction())); 
		} 
		 
		return true; 
	} 
 
	/* 
	 * Getters and setters 
	 */ 
	 
	public UserSessionStatus getDesiredStatus() { 
		return desiredStatus; 
	} 
 
	public void setDesiredStatus(UserSessionStatus desiredStatus) { 
3
CodeRank
This code example shows how to use the following methods:
				modelAndView.addObject("signonForwardAction", url+"?"+query); 
			} 
			else { 
				modelAndView.addObject("signonForwardAction", url); 
			} 
			throw new ModelAndViewDefiningException(modelAndView); 
		} 
		else { 
			return true; 
		} 
	} 
 
} 
4
CodeRank