I'm using spring portlet MVC, and Liferay 6.1 CE. I have 3 jsp pages for example addDetails.jsp, editDetails.jsp and viewDetails.jsp, I would like to use single jsp page for all the 3 actions(viewing, editing and adding details) instead of 3 jsp pages. Will view and edit mode of portlet will help to achieve this? Please help me. Thanks in advance
Thank you for the reply. I implemented this idea already and it is working fine, bt I would like to use view and edit mode of portlet. Isn't it a better idea to use view and edit modes instead of using the parameters. I'm allways confused with difference between view and edit mode, can you explain me briefly?
You certainly can use the edit or view mode of the portlet for this purpose. At a high level, in your Portlet class you will have a method to implement doEdit(...) just as you have doView(...), and doAction(). When you define youre link to edit the record in the view, you'll need to specify in the link to use "doEdit". Of course, these method names are only a high-level view and vary based on your portlet container specification/implementation (JSR 168, JSR 286, IBM, etc..). Hope that helps.
The knights of nee want a shrubbery. And a tiny ad: