可能是因为在afterAdd事件中,获取动作的方式不正确。可以尝试使用this.getEvent().getAction()来获取动作。另外,也要确保在触发afterAdd事件时,动作已经被正确设置。