Hi,

>Is it a good idea to use Model.of(object) instead of throwing exception at
>org.apache.wicket.Component#setDefaultModelObject()
>when there is no model

no, I don't think we should change that.

Why do see the need for this?

Sven


On 21.04.2016 10:11, Martin Grigorov wrote:
Hi,

Is it a good idea to use Model.of(object) instead of throwing exception at
org.apache.wicket.Component#setDefaultModelObject() [1] when there is no
model for this object.
In addition we may log a WARN message explaining that a sub-optimal IModel
impl might be used and the developer will have to either provide a model
before using #setDefaultModelObject() or use #setDefaultModel() instead.


1.
https://github.com/apache/wicket/blob/1cf2a93eb28560e412365d8d6ef1c86d93006f37/wicket-core/src/main/java/org/apache/wicket/Component.java#L3066-L3070


Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov


Reply via email to