how to remove window state

thumbnail
13006, modified 21 Years ago. Liferay Master Posts: 690 Join Date: 8/18/04 Recent Posts
hi any body have any idea , not to give the window state options to the perticular portlet(edit,close,min,max,restore,up,down) absolutely nothing can do abt it by user/poweruser.<br /><br />i appreciate if LEP member give me a clue regd this<br /> cheers<br />thanks in advance.<br /><br />
thumbnail
11365, modified 21 Years ago. Liferay Master Posts: 846 Join Date: 8/5/04 Recent Posts
we do not have an automated way to do that right now, but if you need to disable them then you can override the portlet-default.jsp file which defines these attributes.
thumbnail
11365, modified 21 Years ago. Liferay Master Posts: 846 Join Date: 8/5/04 Recent Posts
view_portlet.jsp eventually uses box_top.jsp to render the borders of the portlet.<br /><br /><br /><br />The easiest and cleanest way to do this to modify box_top-ext.jsp<br /><br /><br /><br />I just checked this into CVS.<br /><br /><br /><br />box_top.jsp reads in parameters from the jsp:include and decides whether to show the maximize buttons or not.<br /><br /><br /><br />so it has references to variables like:<br /><br /><br /><br />portletId<br /><br />stateMax<br /><br />showEditIcon<br /><br /><br /><br />in your box_top-ext.jsp (which is a blank page unless you override), you can do something like<br /><br /><br /><br />if (portletId.equals(&quot;thewideonewithnobuttons&quot;)) {<br /><br />showEditIcon = false;<br /><br />....<br /><br /><br /><br />}<br /><br />else if (portletId.equals(&quot;otherones&quot;)) {<br /><br />if (stateMax) {<br /><br />...<br /><br />}<br /><br />else {<br /><br />...<br /><br />}<br /><br />}<br /><br /><br /><br />You should be able to do everything you need from the given variables. If not, let me know and we&#39;ll add other ones to help you display it.<br /><br /><br /><br />This way, it&#39;s completely flexible for you and you can use JSP instead of just a XML language. I pondered on modifying liferay-portlet.xml to include this logic, but it&#39;d be much more complicated and less flexible.
thumbnail
13006, modified 21 Years ago. Liferay Master Posts: 690 Join Date: 8/18/04 Recent Posts
Thank you mYoung its worked.