Hi

I have a custom model where i need to access to the component. The only method I found seems me a little bit overkill : my model should implement IComponentInheritedModel and I also need to declare a new class implementing IWrapModel to return on wrapOnInheritance. Furthermore all this stuff is not really oriented to simply get the component in the model. (maybe there is a better way?)

I thought about a very simple way :
Just creating a new interface :
IComponentAwareModel{ void setComponent(Component component)}
and adding in component.class
if (model instanceof IComponentAwareModel){ ((IComponentAwareModel)model.setComponent(this))}

I think it also avoid to write 40 code lines just to get the component in the model.

WDYT?

--
Vincent Demay


Reply via email to