public void addListener ( ReadOnlyObjectProperty < Category > categoryProperty ) { categoryProperty . addListener ( ( observable , oldCategory , newCategory ) -> { setView ( newCategory ) ; } ) ; }
Sets the view according to the current category in categoryProperty . Must ensure that the category is already loaded else it will fail .