cancel
Showing results for 
Search instead for 
Did you mean: 

Evaluators...incoherent behavior?

acarpine
Champ in-the-making
Champ in-the-making
Dear community,
I'm working on show/hide some Share actions and I came across a strange behavior.
I defined a custom evaluator in custom-slingshot-application-context.xml as
<bean id="com.evaluator.doclib.action.isMyPreset"
      parent ="evaluator.doclib.action.sitePreset">
      <property name="presets">
         <list>
            <value>my-default-site</value>
         </list>
      </property>
   </bean>
and I bound this evaluator to the document-publish action in share-config-custom.xml:

<action id="document-publish" type="javascript" label="actions.document.publish">
   <param name="function">onActionPublish</param
   <evaluator>com.evaluator.doclib.action.isMyPreset</evaluator>
</action>
Browsing a node within a site with the preset my-default-site the publish action is showed in the document-browser  view but is hide in document-details view.

Since there is a single action document-publish to both views I assumed that the action should have a consistent behavior in all views.

Where is the problem?

Thanks,
Andrea
2 REPLIES 2

afaust
Legendary Innovator
Legendary Innovator
Hello,

there appears to be a bug in a data web script that provides the information for the evaluators - currently, the site preset is not available in document details and thus actions that require it are automatically hidden.
I have opened a JIRA ticket for it: ALF-14408. In it you will find an ad-hoc patch that should fix your immediate problem.

Regards
Axel

acarpine
Champ in-the-making
Champ in-the-making
Great! Thanks Axel. I tried the patch and it seems to works properly.