AnsweredAssumed Answered

FormFilter not being called on action

Question asked by leonardo.celati on Mar 15, 2015
Latest reply on Mar 16, 2015 by afaust
I have implemented a Form Filter and register it within my module-context.xml

The filter is correctly invoked for each forms in share interface, however it is not fired when I need it, which is when I invoke a custom action in doclib and a form is displayed.

This is the form definition in share-config-custom.xml of my share module, nothing special, I have removed the fields (text and date field type) for clarity:

<config evaluator="string-compare" condition="myCustomShareAction">
               <show id="…." />

This is the action

         <action id="${project.artifactId}_MyCustomShareAction"
            type="javascript" label="message.title" icon="invoice-modify-aspect">
            <param name="action">myCustomShareAction</param>
            <param name="function">onActionFormDialog</param>
            <param name="itemKind">action</param>
            <param name="itemId">myCustomShareAction</param>
            <param name="mode">edit</param>
            <param name="destination">{node.nodeRef}</param>
            <param name="successMessage">…</param>
            <param name="failureMessage">…</param>

Then the filter in module-context.xml of my AMP repo project:

   <bean id="actionShareFormFilterNode" class="…ActionShareFormFilter" parent="baseFormFilter">
         <property name="filterRegistry" ref="nodeFilterRegistry" />
   <bean id="actionShareFormFilterType" class="…ActionShareFormFilter" parent="baseFormFilter">
               <property name="filterRegistry" ref="typeFilterRegistry" />

I am not reporting the ActionShareFormFilter because it has nothing special in it just a log statement.
Everything is working, but to reassume, when I click the action in doclib the form is correctly displayed, but the filter is never invoked. If instead I click "modify content", or just viewing a datailst I can see the filter being invoked.

I have removed few lines of code for clarity, so there's probably some syntax error in the lines above.