Override default actions

Hello team,

I would like to override some existing standard action, for example, “create”: <action id="create"/>.
Seems that I need to extend some functionality by creating a subclass of com.haulmont.cuba.gui.components.actions.CreateAction class.

But what are the next steps?
Can you provide some examples, please? (I couldn’t find it)

Thanks!

I have found the stanard API for Create and Edit Actions to be sufficient but you may be an edge case and would need to extend the class. What kind of functionality are you hoping to add? Perhaps the functionality is there but maybe isn’t clear.

For example, I would like to override isApplicable() method.

Hi Ivan,

Here’s an example of overriding isApplicable() method in the platform code: UserBrowser.java#L137

Also, some useful links:

Documentation: BaseAction and List Actions;
Forum:

2 Likes

Thanks, Olga! Got it!