0
votes

could you please help? use liferay 6.1;

the case is: several portlets on the page(search, login and others portlets). jsession is timeout. try to search, go to login page. But: url is en/start?p_p_state=normal&p_p_lifecycle=1&p_p_id=Search_WAR_INSTANCE_1x2x&p_l_id=10715&p_auth=lYs61bin&p_p_mode=view&p_v_l_s_g_id=0

and error from search portlet ("you do not have permission to access" ). If i set p_p_lifecycle=0 -> no error.

Question is How to change the p_p_lifecycle. thank you a lot

1
Please try to make sense of your question and try to format the question so that it is understandable. I can't seem to understand your problem.Prakash K

1 Answers

3
votes

Lifecycle param is used to specify which method phase of the portlet has to be called, so which method will be called. 0 is for render, 1 for processAction, 2 for serveResource. If you use a JSP with liferay-portlet taglib, you can change the Lifecycle by calling :

  • renderURL for render method;
  • actionURL for processAction method;
  • resourceURL for serveResource method.

For example :

<liferay-portlet:actionURL var="myUrl">
</liferay-portlet:actionURL>

This code will create an URL to your processAction (lifecycle=1) in a variable called "myUrl". You can use this URL like that, for example :

<aui:form action="${myUrl}" method="post">...</aui:form>

Hope it helps you.

Leo