Reproduce:
- Add a component
child to a component parent that uses a model
- Use a
NestedComponentModel for the component child to delegate the calls to the model of parent
- Add another component
subchild to child using a ComponentPropertyModel to access properties of the model used by child, and subsequently parent.
- Model access throws exception
because the ComponentPropertyModel uses getInnermostModel, which in the case of a ComponentModel is not the IWrapModel that does the delegation, ComponentModel#getObject is called, which then throws an exception.
Reproduce:
childto a componentparentthat uses a modelNestedComponentModelfor the componentchildto delegate the calls to the model ofparentsubchildtochildusing aComponentPropertyModelto access properties of the model used bychild, and subsequentlyparent.because the
ComponentPropertyModelusesgetInnermostModel, which in the case of aComponentModelis not theIWrapModelthat does the delegation,ComponentModel#getObjectis called, which then throws an exception.