Liferay Portlet Basic MVC Flow and View Selection

后端 未结 1 1982
温柔的废话
温柔的废话 2021-01-24 21:13

I\'m trying to develop a basic portlet with LifeRay 6.1. I\'m well versed with various MVC implementations, but I find Liferay / java portlets somewhat confusing - especially t

相关标签:
1条回答
  • 2021-01-24 22:04

    I found the solution. You can allocate a render parameter on the ActionResponse object that is passed to the controller action. This tells liferay to load the supplied view. i.e.

    public void editSlide(ActionRequest actionRequest, ActionResponse actionResponse) throws IOException, PortletException {
    
        // action code goes here
    
        // set up the view
        actionResponse.setRenderParameter("mvcPath", "/views/edit.jsp");        
    
    }
    
    0 讨论(0)
提交回复
热议问题