XML Configuration Files
We should have clear understanding of below XML files before developing any portlet in Liferay.
These three files are the backbone of liferay portlet. Lets explain each of the files
This file basically contains portlet name, display name, portlet class, initialization parameters and many more. Some of the important tags of this file are <portlet-name/>, <display-name/>, <portlet-class>. For example
The portlet-class tag may contain built in Liferay MVC Portlet or it can be our custom class. We can develop portlet by Liferay MVC or by Spring MVC or by JSF and so on. By inspecting portlet-class tag we will be able to identify the nature of the portlet
In this file we can define css, js files required for the portlet. We can also define whether a portlet is instanceable or not. Set the instanceable value to true if the portlet can appear multiple times on a page. If set to false, the portlet can only appear once on a page. The default value is false.
This file is used for categorization of the portlet. We can create our own category as needed. For example
<category name="Pro Liferay">
<portlet id="sample" />
Here the sample portlet will be listed in Liferay under "Pro Liferay" category.
The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.