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