You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by paksegu <pa...@yahoo.com> on 2007/06/21 20:44:33 UTC
Fwd: Re: Disabling the Minimize/ maximize portlet function based on roles
Note: forwarded message attached.
---------------------------------
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more.
Re: Fwd: Re: Disabling the Minimize/ maximize portlet function based
on roles
Posted by Ate Douma <at...@douma.nu>.
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 <da...@bluesunrise.com>
> Date:
> Thu, 14 Jun 2007 13:43:35 -0700
> To:
> "Jetspeed Users List" <je...@portals.apache.org>
>
> To:
> "Jetspeed Users List" <je...@portals.apache.org>
>
>
>
> 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: jetspeed-dev-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
Re: Fwd: Re: Disabling the Minimize/ maximize portlet function
based on roles
Posted by cgaeking <ch...@gaeking.de>.
paksegu wrote:
>
>
>
> Note: forwarded message attached.
>
> ---------------------------------
> Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail,
> news, photos & more.
>
> 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
> ${_action.Action} $request.contextPath/$
{_action.link}
> #end
> #end
> </div>
> #end
>
> Restart of server is required as we cache this file
>
I am using the ${_action.Name} variable as well. It's somehow strange that
${_action.Name} changed to "normal", "maximized" and "Minimize" for me!
--
View this message in context: http://www.nabble.com/Fwd%3A-Re%3A-Disabling-the-Minimize--maximize-portlet-function-based-on-roles-tf3961300.html#a13992977
Sent from the Jetspeed - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org