How to hide disabled cookie action

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to hide disabled cookie action

jdcondor
Is there a way to tell NB that a cookie action should not be shown if
enable(Node[]) return false?  I looked through javadoc of CookieAction
hiearchy, and could not find anything obvious.  The alternative hack,
checking for enable on each action in Node.getActions(context), is not
very efficient in case of a large number of selected nodes.

Thanks,

-Nam
Reply | Threaded
Open this post in threaded view
|

Re: How to hide disabled cookie action

jdcondor
I just realize that the CookieAction would not show unless it is
explicitly returned by some overriding getActions implementation.  So
the fix is just to make sure the CookieAction use the cookie mechanism
efficiently.

Nam Nguyen wrote:

> Is there a way to tell NB that a cookie action should not be shown if
> enable(Node[]) return false?  I looked through javadoc of CookieAction
> hiearchy, and could not find anything obvious.  The alternative hack,
> checking for enable on each action in Node.getActions(context), is not
> very efficient in case of a large number of selected nodes.
>
> Thanks,
>
> -Nam
>