Use ref-cursor to manage active view instead of component state.