Not finding what you are looking for? Request a recipe!
The solution to this problem is to build a function that wraps a ClassFactory around the itemRenderer class and that injects the necessary properties.
To use the Class for the selection of the view, you have to build a helper function that looks up the index of the view by its Class. This is done by iterating over all ComponentDescriptors of the ViewStack and returning the index of the one whose type value is matching to the Class.