You can get type safety and loose-coupling with o.a.w.Session's metadata
support. This is our constructor for such a model:
SessionMetaDataModel(T defaultObject, MetaDataKey<T> key)

The implementation just uses Session#setMetaData() and
Session#getMetaData().

On Mon, Apr 9, 2012 at 5:34 PM, Carl-Eric Menzel <[email protected]>wrote:

> On Mon, 9 Apr 2012 16:23:38 -0700 (PDT)
> armhold <[email protected]> wrote:
>
> > SessionModel<MyDTO> model = new SessionModel<MyDTO>(MyDTO.KEY, new
> > MyDTO());
> >
> > Not typesafe, as you pointed out, but fairly concise.
>
> If you have a lot of different types where you use that, this map-like
> approach is probably better, yes.
>
> > > Alternatively you might want to look at the wicket-seam integration
> > > and use Seam conversations.
> >
> > Actually we started out using Wicket-CDI + Seam, expressly because of
> > the conversation support, but ran into issues making it work on
> > WebSphere... a topic for another day. :-)
>
> Heh. WebSphere, a fountain of constant joy :-)
>
> Carl-Eric
> www.wicketbuch.de
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to