Forums de discussion
Portlets render order
Ángel García, modifié il y a 9 années.
Portlets render order
New Member Publications: 2 Date d'inscription: 30/09/14 Publications récentes
Hi community!!
We have a set of own portlets developed, one specifically (a Top Bar) is rendered on every pages.
We have a jsp code that load this portlet:
Now I want to render this portlet first, before our own portlets, even before liferay portlets.
According documentation and the dtd:
So, I try to modify the file liferay-portlet.xml, setting <render-weight> value to 100, that is more than the default (1) and more than the liferay portlets value (50).
But I can't to archieve this behaivor.
Any ideas?
Should I create a Ext plugin? How I know that my application is getting these values correctly?
Regards.
NOTES:
We have a set of own portlets developed, one specifically (a Top Bar) is rendered on every pages.
We have a jsp code that load this portlet:
<liferay-portlet:runtime portletName="<%= portletId %>" />
Now I want to render this portlet first, before our own portlets, even before liferay portlets.
According documentation and the dtd:
The default value of render-weight is 1. If set to a value less than 1, the
portlet is rendered in parallel. If set to a value of 1 or greater, then the
portlet is rendered serially. Portlets with a greater render weight have greater
priority and will be rendered before portlets with a lower render weight.
If the ajaxable value is set to false, then render-weight is always set to 1
if it is set to a value less than 1. This means ajaxable can override
render-weight if ajaxable is set to false.
So, I try to modify the file liferay-portlet.xml, setting <render-weight> value to 100, that is more than the default (1) and more than the liferay portlets value (50).
But I can't to archieve this behaivor.
Any ideas?
Should I create a Ext plugin? How I know that my application is getting these values correctly?
Regards.
NOTES:
- I take care to dispose all portlets into only one column, after reading sanjay datta post
- Also I try to set other portlets to <render-weight>0</render-weight> to load those portlets in parallel and delay them.
Denis Signoretto, modifié il y a 9 années.
RE: Portlets render order
Expert Publications: 375 Date d'inscription: 21/04/09 Publications récentes
Enabling debug logs for class com.liferay.portal.layoutconfiguration.util.RuntimePageImpl should help understanding render processing order.
Regards,
Denis
Regards,
Denis
Ángel García, modifié il y a 9 années.
RE: Portlets render order
New Member Publications: 2 Date d'inscription: 30/09/14 Publications récentes
Thanks for you answer Denis,
I use liferay version 6.1.2. And the class com.liferay.portal.layoutconfiguration.util.RuntimePageImpl is not defined in this version. There is a similar class to enable that behavior?
I use liferay version 6.1.2. And the class com.liferay.portal.layoutconfiguration.util.RuntimePageImpl is not defined in this version. There is a similar class to enable that behavior?
Denis Signoretto, modifié il y a 9 années.
RE: Portlets render order
Expert Publications: 375 Date d'inscription: 21/04/09 Publications récentes
Hi Angel,
you are right, portlet parallel render has been revamped in 6.2 and my suggestion it's valid only for Liferay 6.2.
I suspect the issue depends by runtime portlet inclusion in your code. Runtime portlets are not processed
following parallel mode (setting a weight shouldn't take effect) so I guess the order depends by the order
of the execution of the jsp that includes the runtime portlet.
you are right, portlet parallel render has been revamped in 6.2 and my suggestion it's valid only for Liferay 6.2.
I suspect the issue depends by runtime portlet inclusion in your code. Runtime portlets are not processed
following parallel mode (setting a weight shouldn't take effect) so I guess the order depends by the order
of the execution of the jsp that includes the runtime portlet.