Customise Save and Save As action in Filters


I want to validate the conditions provided by the user across the screens while he tries to save the filter. Is it possible to override the save filter functionality?

Any takers?


Filter component behavior is inside the FilterDelegate Spring bean. In your project, you can override this bean.

You may create a class that extends the FilterDelegateImpl class in the web module of your app:

public class ExtFilterDelegateImpl extends FilterDelegateImpl {

    protected void createFilterActions() {
        saveAction = new MySaveAction("save", false, getMainMessage(""));

    private class MySaveAction extends SaveAction {

        public MySaveAction(String id, boolean saveWithValues, String caption) {
            super(id, saveWithValues, caption);

        public void actionPerform(Component component) {
                    .withCaption("Pre-save check invoked")

and register the bean in web-spring.xml:

<bean id="cuba_FilterDelegate" class="" scope="prototype"/>