Hi Sven,

I think it would be useful if you add an explanation to the wiki page how
it works.
As far as I see from the code it is based on reflection by using Objenesis.

I also saw performance tests which verify that LazyModel is at least twice
faster than PropertyModel. This information may be used as an advertisement
in the Wiki page!

Also I think there is an error in this example:


 private static final IModel<B> B = model(from(A.class).getB());

  IModel<A> a = ...;

  add(new TextField<B>("b", B.bind(a));


I don't see how 'B' can have method #bind(IModel) unless the IModel in the
example is some other class, not the one in wicket-core.


On Mon, Feb 18, 2013 at 7:30 PM, Sven Meier <[email protected]> wrote:

> Hi all,
>
> I've added a new module to wicketstuff:
>
> LazyModel offers lazy evaluation of method invocations. It takes the best
> from present solutions (safemodel and modelfactory) and improves on
> reflection to support:
>
> * arbitrary parameters
> * generics
> * collections
> * interfaces
>
> Two simple examples:
>
>     IModel<String> model = model(from(a).getB().**
> getStrings().get("key"));
>
>     new LazyColumn<A, B>(header, from(A.class).getB());
>
> Read more here:
>
>     
> https://github.com/**wicketstuff/core/wiki/**LazyModel<https://github.com/wicketstuff/core/wiki/LazyModel>
>
> Have fun
> Sven
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: 
> users-unsubscribe@wicket.**apache.org<[email protected]>
> For additional commands, e-mail: [email protected]
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

Reply via email to