A lot more indeed!

On Thu, Apr 21, 2016 at 11:25 PM, Martin Grigorov <[email protected]>
wrote:

>
> https://git1-us-west.apache.org/repos/asf?p=wicket.git;a=commitdiff;h=4236533e;hp=6839a8c76426b3a8621d4cf64b2ca781d0b8b7a8
>
> Hopefully this is more clear now.
>
> Thanks for the feedback!
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Thu, Apr 21, 2016 at 11:32 AM, Tobias Soloschenko <
> [email protected]> wrote:
>
> > +1 - that's also my point of view Ernesto.
> >
> > kind regards
> >
> > Tobias
> >
> > > Am 21.04.2016 um 10:31 schrieb Ernesto Reinaldo Barreiro <
> > [email protected]>:
> > >
> > > Martin,
> > >
> > > To me throwing an exception if the best way to indicate that you
> haven't
> > > set a model for component and that you are trying to store something on
> > > something that does not exists. Otherwise sloppy users might just
> > > "accidentally" serialize large "business objects" without noticing.
> > >
> > > On Thu, Apr 21, 2016 at 10:11 AM, Martin Grigorov <
> [email protected]>
> > > 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
> > >
> > >
> > >
> > > --
> > > Regards - Ernesto Reinaldo Barreiro
> >
>



-- 
Regards - Ernesto Reinaldo Barreiro

Reply via email to