Invoke the “onEnter” function by the other way