-
1. Re: Remove portlet Maximize button.
fuchs Mar 13, 2009 6:29 AM (in response to peris)One alternative ist to turn off the render mode (emptyRenderer).
<window> <window-name>PortletWindow</window-name> <instance-ref>PortletInstance</instance-ref> <region>left</region> <height>1</height> <properties> <!-- turn the decoration off for this portlet (i.e. no title and mode/state links) --> <property> <name>theme.decorationRendererId</name> <value>emptyRenderer</value> </property> </properties> </window>
-
2. Re: Remove portlet Maximize button.
peris Mar 13, 2009 6:36 AM (in response to peris)Thanks Fuchs. If I set emptyRenderer, we cant see the other link(minimize). I want to remove only maximize button .
-
3. Re: Remove portlet Maximize button.
apemberton Mar 13, 2009 9:08 AM (in response to peris)One technique we've used in the past to do what you're describing is somewhat similar to fuchs recommendation.
We extended our custom decoration renderers to look for a window property to disable certain mode/state links.
Example property:<property> <name>maximized.windowstate.decoration.render</name> <value>false</value> </property>
And then your decoration renderer code would look something like:if (drc.getProperty(action.getName() + "." + actionKey + ".decoration.render") != null) { render = Boolean.valueOf(drc.getProperty(action.getName() + "." + actionKey+ ".decoration.render")); } if (render) { //print out link markup }
-
4. Re: Remove portlet Maximize button.
fuchs Mar 13, 2009 9:14 AM (in response to peris)Iam not sure, because dont use any modes. But a other solution could be to overwrite the css.
.portlet-mode-maximized { overflow: hidden; }
Maybe with hidden or nothing. -
5. Re: Remove portlet Maximize button.
apemberton Mar 13, 2009 11:06 AM (in response to peris)I don't think you'd want to set overflow, you'd want to set either visibility, display, or use positioning to push the element off the screen:
display:none; visibility:hidden; position:absolute;left:-9999em;
This solution would still render the links in the markup, but use CSS to hide or move them for *all* portlets.
I'd recommend extending your DecorationRenderer to support your needs as mentioned previously. -
6. Re: Remove portlet Maximize button.
peris Mar 16, 2009 1:08 AM (in response to peris)Thankyou apemberton and Fuchs.
I have set the following code in css.
visibility:hidden;
position:absolute;left:-9999em;
It is working fine.