Hi duesenklipper.
> I'd rather use a custom Session subclass with typesafe getters and
> setters:
> class MySession extends WebSession {
> private MyDTO dtoForFlow;
> public MyDTO getDtoForFlow() {
> return dtoForFlow;
> }
Typesafety via custom sessions is nice, but I think that would require
custom model classes for each kind of DTO in order to reach into the
session, like:
public class MyDTOModel implements IModel<MyDTO>
{
public MyDTO getObject()
{
return ((MySession) Session.get()).getDtoForFlow();
}
public void setObject(MyDTO object)
{
((MySession) Session.get()).setDtoForFlow(object);
}
// ...
}
vs:
SessionModel<MyDTO> model = new SessionModel<MyDTO>(MyDTO.KEY, new MyDTO());
Not typesafe, as you pointed out, but fairly concise.
> 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. :-)
Thanks for your help.
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/a-model-for-passing-data-between-pages-tp4542878p4544145.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]