Add onBeforeRendering

enable wave refresh on every page navigation