Hi
I’m trying to extend ExcelAction
behavior globally and I met two ExcelAction
classes in the framework (cuba 7.2).
com.haulmont.cuba.gui.components.actions.ExcelAction
This one is referenced in com.haulmont.cuba.gui.components.actions.ListActionType
, so when defining a standard table action in screen xml like this.
<action id="excel" type="excel"/>
It seems logical that this is the one to be used ; plus there is clear documentation in the class code on how to extend it globally.
/**
* Standard table action to export the list of entities to XLS.
* <p>
* Action's behaviour can be customized by providing arguments to constructor or setting properties.
* <p>
* In order to provide your own implementation globally, create a subclass and register it in {@code web-spring.xml},
* for example:
* <pre>
* <bean id="cuba_ExcelAction" class="com.company.sample.gui.MyExcelAction" scope="prototype"/>
* </pre>
* Also, use {@code create()} static methods instead of constructors when creating the action programmatically.
*/
@org.springframework.stereotype.Component("cuba_ExcelAction")
@Scope("prototype")
Documentation I have followed to create my own ExceExcelAction
class.
But in reality, the one that is used is the following
com.haulmont.cuba.gui.actions.list.ExcelAction
Code is essentially the same, but for this one there is no documented way of extending it. Why this duplication, and how can I replace it globally ?
Regards
Michael