The Portlet specification says Minimized & Maximized WindowStates are 
*required* states every portlet has to support.
So, disabling them isn't something you'll get on portlet-container level.
But you can quite easily write a custom portlet decorator suppressing them as 
David gave an example of before.
And if you want to go fancy, take a look at the DecoratorActionsFactory 
interface and related example implementations.
It provides you with all the power to write any possible portlet "action" 
filter you like, including performing security/role check and whatever.

Ate

paksegu wrote:


Note: forwarded message attached.

------------------------------------------------------------------------
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: <http://us.rd.yahoo.com/evt=48253/*http://mobile.yahoo.com/go?refer=1GNXIC> mail, news, photos & more.
------------------------------------------------------------------------

Subject:
Re: Disabling the Minimize/ maximize portlet function based on roles
From:
David Sean Taylor <[EMAIL PROTECTED]>
Date:
Thu, 14 Jun 2007 13:43:35 -0700
To:
"Jetspeed Users List" <[EMAIL PROTECTED]>

To:
"Jetspeed Users List" <[EMAIL PROTECTED]>



On Jun 12, 2007, at 4:13 PM, paksegu wrote:

Hi,
How can I disable the minimize/maximize portlet functions based on roles?
  Thanks

Well I thought you could simply edit the jetspeed.properties and comment out the window state support

# supported.windowstate = minimized

But it appears that does not work.

Here is a quick hack fix, although I'd prefer fixing the bug
If you could formalize a bug report in JIRA that would help, as it could be a useful feature

For now, edit jetspeed_macros.vm:

#macro(PortletActionBar $_decoration)
 #set($_actions = $_decoration.actions)

 <div class="PActionBar">
    #foreach ($_action in $_actions)
   #if (${_action.Name} == "Minimize" || ${_action.Name} == "Maximize")
    #else
<a href="${_action.Action}" title="${_action.Name}" class="action portlet-action" #if($_action.target)target="$_action.target"#end><img src="$request.contextPath/${_action.link}" alt="${_action.Alt}" border="0" /></a>
      #end
    #end
 </div>
#end

Restart of server is required as we cache this file




------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to