////import statement above
@Controller(value = “helloworld”)
public class HelloWorld {
@RenderMapping
@RequestMapping(“VIEW”) // this will tell the front controller or dispatcher for view mode
public ModelAndView handleViewRenderRequest(RenderRequest request,RenderResponse response){
Map model = new HashMap();
model.put(“message”, “Spring-Liferay portlet view mode is a success”);
return new ModelAndView(“view”,model);
}
@RenderMapping
@RequestMapping(“EDIT”) // this will tell the front controller or dispatcher for edit mode
public ModelAndView handleEditRenderRequest(RenderRequest request,RenderResponse response){
Map model = new HashMap();
model.put(“message”, “Spring-Liferay portlet edit mode is a success”);
return new ModelAndView(“edit”,model);
}
}