Ugh, right!

Then maybe just make IModel#setObject() default too ...
We will experiment! :)

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

On Tue, Oct 6, 2015 at 11:27 PM, Michael Mosmann <[email protected]> wrote:

> .. @IReadOnlyModel: i hope, it will be easier to change then the last time
> i tried it. Watch out for component default model stuff...
>
> :)
>
> Am 6. Oktober 2015 22:54:37 MESZ, schrieb Martin Grigorov <
> [email protected]>:
> >On Tue, Oct 6, 2015 at 10:43 PM, Andrew Geery <[email protected]>
> >wrote:
> >
> >> If IModel were a @FunctionalInterface, then you wouldn't need
> >something
> >> like a SupplierModel; you could just use a lambda directly:
> >>
> >> new Label("label", () -> "The current time is " + LocalDate.now());
> >>
> >
> >This looks good indeed.
> >It seems we will add IReadOnlyModel soon!
> >
> >
> >>
> >> And since IModel is Serializable, the lambda will be too, without
> >having to
> >> have an artificial interface that is both Serializable & a Supplier.
> >>
> >> Thanks
> >> Andrew
> >>
> >> On Tue, Oct 6, 2015 at 4:21 PM, Martin Grigorov
> ><[email protected]>
> >> wrote:
> >>
> >> > Same for IRequestHandler#detach()
> >> >
> >> > Martin Grigorov
> >> > Wicket Training and Consulting
> >> > https://twitter.com/mtgrigorov
> >> >
> >> > On Mon, Oct 5, 2015 at 10:42 PM, Martijn Dashorst <
> >> > [email protected]> wrote:
> >> >
> >> > > Should we use an empty default implementation for IModel#detach?
> >> > >
> >> > >
> >> > > public class IModel<T> extends IDetachable
> >> > > {
> >> > >     ...
> >> > >
> >> > >     @Override
> >> > >     default void detach()
> >> > >     {
> >> > >     }
> >> > > }
> >> > >
> >> > > This won't break existing applications, but might make it a bit
> >easier
> >> > > on the eyes to implement IModel directly.
> >> > >
> >> > > I'm not in favor of applying the default method to IDetachable,
> >> > > because that would defeat the interface's purpose IMO.
> >> > >
> >> > > WDYT?
> >> > >
> >> > > Martijn
> >> > >
> >> >
> >>
>
> --
> Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail
> gesendet.

Reply via email to