How to set portlet loading order in liferay portlets

I have about 4 portlets and 2 web content on my page. Among the 4 portlets, one is a user portlet. my requirement is like I need to load my custom portlet at the end. I found out that we can set this by adding the following entry to liferay-portlet.xml

<render-weight>0</render-weight>

from liferay-portlet-app_6_2_0.dtd I recognized The default value for rendering is 1. If set to less than 1, the portlet runs in parallel. If set to 1 or more, the portlet is displayed as a series. Portlets with a higher weight are priority and will be displayed before portlets with a lower rendering weight.

My question is how can I set the weight of portable liferay portlets. Do I need to record in any properties file or can I achieve this using the control panel.

+4
source share
1 answer

There is no guarantee for a visualization order, and you should not change any state in the rendering phase - in fact, the state does not change (for example, the public render parameter, etc.), if only because you cannot even change them on RenderRequest / RenderResponse.

, , . , (, RSS-). , , <render-weight> 0 <ajaxable> true liferay-portlet.xml

+5

Source: https://habr.com/ru/post/1535694/


All Articles