As shown in the next screenshot, the Book Reports portlet lists the reports about books with the report name as a link. Clicking on this link will allow the user to view the report details. So how can we build the book_reports
portlet? As mentioned earlier, the view is a JSP template, which will generate the content of the portlet by pulling out dynamic model information from the request attributes. We have provided static content from the JSP file. So how can we generate dynamic content in these JSP? Let's construct a basic Struts portlet—using book_reports
as an example—to see how to build the portlet and how to generate dynamic content in the JSP files of the portlet.
As shown in the following screenshot, we are planning to build a struts portlet book_reports
with the following view—a link with the message Preference
, a title Book Reports
, the preference name Liferay Book
, and the value Liferay Portal Enterprise Intranets
.
Moreover, after the link is...