Search code examples
cuba-platform

Transient fields reset after filter search


I'm setting a transient attribute in the screen controller using a service to retrieve the information I need (which is a list of instances that need the attribute to be set). The problem is that after using a filter, the transient attribute reset. Is it expected? Is there a listener to be used after a filter is applied?


Solution

  • Yes, there is such listener:

    @Inject
    private Filter filter;
    
    @Override
    public void init(Map<String, Object> params) {
        filter.setAfterFilterAppliedHandler(() -> {
    
        });
    }