Cause I couldn't find a solution, I will do it this way, which actually works fine:
Code:
private NewFeatureAction getNewFeatureAction(){
if (newFeatureCommand == null){
newFeatureCommand = new NewFeatureAction();
getWindowCommandManager().configure(newFeatureCommand);
}
return newFeatureCommand;
}
private class NewFeatureAction extends ActionCommand {
public NewFeatureAction() {
super("newFeatureCommand");
setSecurityControllerId("adminController");
}
@Override
protected void doExecuteCommand() {
...
}
}