[opencms-dev] tool handler depending on session attributes
Michael Moossen
m.moossen at alkacon.com
Fri Mar 19 12:17:40 CET 2010
Hi Nacho!
the I_CmsToolHandler was sometime refactored to also provide the
isVisble(CmsWorkplace) and isEnabled(CmsWorkplace) methods just because
of scenarios like yours.
if you implement these methods the isVisible(CmsObject) and
isEnabled(CmsObject) wont be called anymore. (see
org.opencms.workplace.tools.A_CmsToolHandler).
once you have the wp instance you can access to the session with:
wp.getJsp().getRequest().getSession();
HTH
Michael
Nacho Fernández Orellana wrote:
> Hi list. I've been trying to write a new tool handler that enables some
> tools depending on a certain session attribute. As far as I've tried,
> this is not possible as the only parameter is a CmsObject. I've also
> tried passing the session attribute as a parameter in the
> admintoolhandler-args without success (invalid scope exception thrown).
>
> Does someone know if what I'm trying to do is possible? Thanks in advance.
>
> Greetings,
>
> Nacho Fernandez.
>
>
> ------------------------------------------------------------------------
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
More information about the opencms-dev
mailing list