Re: [Liferay Forums][3. Development]Fixed starting point for portlets

138830, modified 18 Years ago. New Member Posts: 5 Join Date: 9/10/07 Recent Posts
Hi there,

I think it is a stupid question but I haven't found something about that anywhere. I am working with Liferay Portal 4.3. Imagine you got a portlet on your page called "Portlet1" (you have developped it on your own). You are logged in as an administrator, so you can see the title above with some buttons like "Edit", "Help", if you know what I mean. So you click on "Edit", the Edit page is shown, and then you close your browser. If you start it up again and go back to your portlet, the Edit page is still shown - and not the "real" starting point of the portlet (and this would go on like that until the portlet will be deleted from the page and included again). I think it's a feature of Liferay to keep in mind which page was shown before the browser was closed, but I don't like it so I would like to force the portlet to show always the same starting point, e.g. "overview.jsp".

Is there any possibility to do that?

Thanks in advance.

(If there is a similar question somewhere in the forum, I did not find it, so I'd be sorry)...
thumbnail
10527, modified 18 Years ago. Liferay Legend Posts: 1197 Join Date: 2/8/05 Recent Posts
Two questions:
1. Which version of the portal are you using?
2. What is the value of
layout.remember.session.window.state.maximized= in
portal(-ext).properties?
138830, modified 18 Years ago. New Member Posts: 5 Join Date: 9/10/07 Recent Posts
Hi,

i am using Liferay Portal 4.3.5. I have a portal.properties in the portal-impl/classes file, and the value of layout.remember.session.window.state.maximized is false. I am working with Tomcat.
25176, modified 18 Years ago. Regular Member Posts: 131 Join Date: 8/4/06 Recent Posts
Kerstin Görtz:
Hi,

i am using Liferay Portal 4.3.5. I have a portal.properties in the portal-impl/classes file, and the value of layout.remember.session.window.state.maximized is false. I am working with Tomcat.


Hello,

Programmatically you can do that. With init() in your portlet, you can force changing your portlet mode from maximize into minimize and edit mode to view mode. I don't have the code with me but you know what I mean.

Regards,

Andy
138830, modified 18 Years ago. New Member Posts: 5 Join Date: 9/10/07 Recent Posts
I'm sorry but I don't know what you mean. I do not want to maximize or minimize the portlet. The second approach, changing edit mode to view mode, sounds interesting but I don't have a clue how to do that. Where in the portlet should I use the init() method? In the Action class of the edit page? emoticon Sorry for my dumb questions emoticon
25176, modified 18 Years ago. Regular Member Posts: 131 Join Date: 8/4/06 Recent Posts
Kerstin Görtz:
I'm sorry but I don't know what you mean. I do not want to maximize or minimize the portlet. The second approach, changing edit mode to view mode, sounds interesting but I don't have a clue how to do that. Where in the portlet should I use the init() method? In the Action class of the edit page? emoticon Sorry for my dumb questions emoticon


I am sorry, I don't find the code anymore or maybe I am impatient. Here is a snippet:

<portlet:renderurl portletMode="view" />


See the above? There is something about portletMode, you have to check the API as I don't quite remember. There is supposed s sample that contains the code but I couldn't find it. I am sorry but I hope you can find the code and it's only a method call, that's it.