Spring Framework MultiActionController - 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 MultiActionController class.

This code example shows how to use the following methods:
import org.springframework.web.servlet.mvc.multiaction.MultiActionController; 
 
/** 
 * @author Rob Harrop 
 */ 
public class AdminController extends MultiActionController { 
 
} 
7
CodeRank
This code example shows how to use the following methods:
import org.springframework.web.servlet.mvc.multiaction.MultiActionController; 
 
/** 
 * Reproduces SEC-830. 
 */ 
public class TestMultiActionController extends MultiActionController { 
    public static final String VIEW_NAME = "multi-action-test"; 
 
    public String login(HttpServletRequest request, HttpServletResponse response) { 
        return "login"; 
    } 
 
    public void step1(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 
        String[] x = request.getParameterValues("x"); 
        logger.info("x= " + (x == null ? "null" : Arrays.asList(x))); 
        String[] y = request.getParameterValues("y"); 
        logger.info("y = " + (y == null ? "null" : Arrays.asList(y))); 
        request.getRequestDispatcher("/testMulti.htm?action=step1xtra&x=5&x=5").forward(request, response); 
    } 
 
6
CodeRank
This code example shows how to use the following methods:setMethodNameResolver
	 * Creates a reward controller. 
	 * @param rewardNetwork application responsible for creating rewards 
	 * @param rewardLookupService responsible for retrieving historical 
	 * information on previously confirmed rewards. 
	 */ 
	public RewardController(RewardNetwork rewardNetwork, RewardLookupService rewardLookupService) { 
		this.rewardNetwork = rewardNetwork; 
		this.rewardLookupService = rewardLookupService; 
		// resolves the request to a method on this controller class 
		setMethodNameResolver(new PathBasedMethodNameResolver()); 
	} 
 
	/** 
	 * Prepares the "new reward" form for display before it is rendered, then 
	 * selects it for display. Preparation logic consists of registering a 
	 * custom property editor to properly format initial form field values. 
	 * @param request the request 
	 * @param response the response 
	 * @return a selection of the "new reward" view with the data needed to render it 
	 */ 
6
CodeRank
This code example shows how to use the following methods:
 
public class NotificationApiController extends MultiActionController { 
 
	private NotificationManager notificationManager; 
 
	public NotificationApiController() { 
		notificationManager = new NotificationManager(); 
	} 
 
	public ModelAndView list(HttpServletRequest request, 
			HttpServletResponse response) throws Exception { 
		ModelAndView mav = new ModelAndView(); 
		// mav.addObject("list", null); 
		mav.setViewName("notification/form"); 
		return mav; 
	} 
 
	public void send(HttpServletRequest request, 
			HttpServletResponse response) throws Exception { 
		String broadcast = ServletRequestUtils.getStringParameter(request, 
6
CodeRank
This code example shows how to use the following methods:
 */ 
public class NotificationController extends MultiActionController { 
 
    private NotificationManager notificationManager; 
 
    public NotificationController() { 
        notificationManager = new NotificationManager(); 
    } 
 
    public ModelAndView list(HttpServletRequest request, 
            HttpServletResponse response) throws Exception { 
        ModelAndView mav = new ModelAndView(); 
        // mav.addObject("list", null); 
        mav.setViewName("notification/form"); 
        return mav; 
    } 
 
    public ModelAndView send(HttpServletRequest request, 
            HttpServletResponse response) throws Exception { 
        String broadcast = ServletRequestUtils.getStringParameter(request, 
6
CodeRank
This code example shows how to use the following methods:
 
/** 
 * @author Daniel Mitterdorfer 
 * 
 */ 
public class RecipeController extends MultiActionController { 
	private RecipeManager recipeManager; 
	 
	public void setRecipeManager(RecipeManager recipeManager) { 
		this.recipeManager = recipeManager; 
	} 
	 
	public ModelAndView welcomeHandler(HttpServletRequest request, HttpServletResponse response) throws ServletException { 
		return new ModelAndView("welcomeView"); 
	} 
	 
	public ModelAndView recipesHandler(HttpServletRequest request, HttpServletResponse response) throws ServletException { 
		return new ModelAndView("recipesView", "recipes", recipeManager.getAllRecipes()); 
	} 
} 
6
CodeRank
This code example shows how to use the following methods:
import org.springmodules.samples.lucene.service.category.CategoryService; 
 
/** 
 * @author Thierry Templier 
 */ 
public class CategoryController extends MultiActionController { 
 
	private CategoryService categoryService; 
 
	private int getId(HttpServletRequest request) { 
		String tmpId = request.getParameter("id"); 
		return Integer.parseInt(tmpId); 
	} 
 
	public ModelAndView list(HttpServletRequest request, 
							  HttpServletResponse response) throws Exception { 
		List categories = categoryService.getCategories(); 
		return new ModelAndView("category/categories", "categories", categories); 
	} 
 
6
CodeRank
This code example shows how to use the following methods:
import org.springmodules.examples.workflow.osworkflow.service.DocumentApprovalWorkflow; 
 
/** 
 * @author robh 
 */ 
public class DocumentApprovalController extends MultiActionController { 
 
	private DocumentApprovalWorkflow workflow; 
 
	public void setWorkflow(DocumentApprovalWorkflow workflow) { 
		this.workflow = workflow; 
	} 
 
	public ModelAndView start(HttpServletRequest request, HttpServletResponse response) { 
		workflow.startNewWorkflow(); 
		return status(request, response); 
	} 
 
	public ModelAndView status(HttpServletRequest request, HttpServletResponse response) { 
 
5
CodeRank
This code example shows how to use the following methods:
 * limitations under the License. 
 */ 
 
package org.springframework.samples.petclinic.web; 
 
import java.util.Map; 
 
import javax.servlet.http.HttpServletRequest; 
import javax.servlet.http.HttpServletResponse; 
 
import org.springframework.beans.factory.InitializingBean; 
import org.springframework.samples.petclinic.Clinic; 
import org.springframework.samples.petclinic.Owner; 
import org.springframework.ui.ModelMap; 
import org.springframework.web.bind.ServletRequestUtils; 
import org.springframework.web.servlet.ModelAndView; 
import org.springframework.web.servlet.mvc.multiaction.MultiActionController; 
 
/** 
 * <code>MultiActionController</code> that handles all non-form URL's. 
5
CodeRank
This code example shows how to use the following methods:
import cn.org.rapid_framework.page.Page; 
import cn.org.rapid_framework.page.PageRequest; 
 
import com.sun.jmx.snmp.Timestamp; 
 
public class BaseSpringController extends MultiActionController{ 
	protected final static String CREATED_SUCCESS = "创建成功"; 
	protected final static String UPDATE_SUCCESS = "更新成功"; 
	protected final static String DELETE_SUCCESS = "删除成功"; 
	 
	static { 
		//注册converters 
		ConvertRegisterHelper.registerConverters(); 
	} 
	 
	public static void copyProperties(Object target,Object source) { 
		BeanUtils.copyProperties(target, source); 
	} 
 
	public static <T> T copyProperties(Class<T> destClass,Object orig) { 
5
CodeRank
See Code Examples for Spring Framework MultiActionController Methods: