AnsweredAssumed Answered

Using of SubComponent evaluators

Question asked by webdesigner on Jul 12, 2012
Latest reply on Jul 14, 2012 by afaust
Hello,

I've used this tutorial:
http://docs.alfresco.com/4.0/topic/com.alfresco.enterprise.doc/tasks/tu_40_add-content.html

to place a sub-component to the document library toolbar. This component is a button, that should be displayed according to:

- special folder type
- user membership in the special group

So it means this action should be displayed for some special users in special folders.

But if I tried to use a sub-component evaluator as described here: http://docs.alfresco.com/4.0/topic/com.alfresco.enterprise.doc/tasks/tu-v4-subcomponent-evals.html to implement it, I've found following limitations:
- as parameters in the evaluator implementation I receive only a request context, that has info about used site but not about expanded folder

public boolean evaluate(RequestContext context, Map<String, String> params)
    {
        boolean result;
        String site = context.getUriTokens().get("site");
        ….

- the evaluator has been called only once, if the document library has been opened and not by browsing of folders.

Does anyone have experience with using sub-component evaluators? Is it possible to enable/disable sub-components using another approach?


Thanks in advance
Vitali

Outcomes