You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Joel Trunick <Jo...@SmartPrice.com> on 2003/06/13 00:38:37 UTC
Using Visit in Monitor
I'm trying to use Visit in my Monitor so I have my Engine class as below.
However, in some cases the Visit isn't initialized and so my Monitor has
null for the value of Visit. It appears I can pass getVisit() the cycle and
then it will be created. However, I don't know how to get the cycle from
within the getMonitor() call.
Is it feasible to be able to use Visit in my Monitor class?
Joel
public class SmartEngine extends SimpleEngine {
public IMonitor getMonitor(RequestContext context)
{
return new SmartMonitor( (Visit)getVisit(),context );
}
protected Object createVisit(IRequestCycle cycle) {
HttpSession s = cycle.getRequestContext().getSession();
return new Visit( s );
}
}