How to override create button in EntityCombinedScreen

I am using the EntityCombinedScreen and i want to override the create button in the screen. I added the code below… But the beforeActionPerformed() function was not triggering plz help me regarding this…

Copy
@Named(“table.create”)
CreateAction createAction;

@Override
public void init(Map<String, Object> params) {

super.init(params);

createAction.setBeforeActionPerformedHandler(new Action.BeforeActionPerformedHandler() {
    @Override
    public boolean beforeActionPerformed() {
        return userExtDs.size() < 10;
    }
});

Hi,

Are you sure it is not triggered? The following should work:

public class ExtUserBrowse extends EntityCombinedScreen {
    @Named("table.create")
    private CreateAction tableCreate;

    @Override
    public void init(Map<String, Object> params) {
        tableCreate.setBeforeActionPerformedHandler(() -> {
            showNotification("CreateAction will now be performed");
            return creating;
        });
    }
}

I Use this solution which is not working in EntityCombinedScreen.

If you use EntityCombinedScreen, call the super method in init() first.

I Added the init method already, I given my code below

@Named("table.create")
private CreateAction createAction;

public void init(Map<String, Object> params) {
          super.init(params);
          createAction.setBeforeActionPerformedHandler(() -> {
          System.out.println(“CreateAction will now be performed”);
          showNotification(“CreateAction will now be performed”);
     return true;
});
}