> For example, in Maverick, apparently, your controller may
> recieve a discard() callback when "when the views are
> finished and the model is discarded". I'm not sure of the
> details since I've never used maverick.
It works as you described. When maveric renders a view it executes
following code:
<snip>
View target = (View)this.getView(viewName);
if (null == target)
throw new ServletException("Controller specified view \"" +
viewName + "\", but no view with that name is defined.");
target.go(mctx);
</snip>
After the view is rendered it checks whether your model implements
ModelLifeTime interface:
<snip>
if (mctx.getModel() instanceof ModelLifetime)
((ModelLifetime)mctx.getModel()).discard();
</snip>
Of course this requires you to wrap your model (eg. the model retrieved
directly from Hibernate) inside a custom object that implements
ModelLifetime interface or you have to write that code inside Hibernate
model bean, but I don't think that it's a great idea. Also you could use
your Controller (similar to WebWork action) as a model and implement
that method in controller.
Regards
Aapo Laakkonen
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork