Hi there,
I'm using spring-webmvc-portlet 2.5.6 to build a portlet for liferay 5.1.2.
I build my portlet as described in the petsample. I have several views defined by different RequestMappings and they all work fine. But when my portlet is in windowState=maximized and I want to go back to the normal state, I get an error:
Here is my controller code and as you can see I have defined a default mapping.Code:16:05:01,404 ERROR [DispatcherPortlet:501] Could not complete request javax.portlet.UnavailableException: No matching handler method found for portlet request: mode 'view', type 'action', parameters map[[empty]]
Hope you can help meCode:@Controller @RequestMapping("VIEW") @SessionAttributes("announcement") public class AnnouncementController { private final AnnouncementService annService; @Autowired public AnnouncementController(AnnouncementService annService) { this.annService = annService; } @RequestMapping // default render (action=list) public String overviewAnnouncements(Model model) { model.addAttribute("announcements", this.annService.getAnnouncementsOverview()); return "annList"; } @RequestMapping(params = "action=view") // render phase public String viewAnnouncement(@RequestParam("announcement") String noteId, Model model) { model.addAttribute("announcement", this.annService.getAnnouncement(noteId)); return "annView"; } }
tob


Reply With Quote
