} finally { }}
public void service(IEngineServiceView engine, IRequestCycle cycle, ResponseOutputStream output)
throws ServletException, IOException
{try { __CLOVER_80_0.M[3032]++;
__CLOVER_80_0.S[12480]++;IDirect direct;
__CLOVER_80_0.S[12481]++;int count = 0;
__CLOVER_80_0.S[12482]++;String componentPageName;
__CLOVER_80_0.S[12483]++;IPage componentPage;
__CLOVER_80_0.S[12484]++;RequestContext requestContext = cycle.getRequestContext();
__CLOVER_80_0.S[12485]++;String[] serviceContext = getServiceContext(requestContext);
__CLOVER_80_0.S[12486]++;if ((((serviceContext != null) && (++__CLOVER_80_0.CT[2139] != 0)) || (++__CLOVER_80_0.CF[2139] == 0))){
__CLOVER_80_0.S[12487]++;count = serviceContext.length;}
__CLOVER_80_0.S[12488]++;if ((((count != 3 && count != 4) && (++__CLOVER_80_0.CT[2140] != 0)) || (++__CLOVER_80_0.CF[2140] == 0))){
__CLOVER_80_0.S[12489]++;throw new ApplicationRuntimeException(Tapestry
.getMessage("DirectService.context-parameters"));}
__CLOVER_80_0.S[12490]++;boolean complex = count == 4;
__CLOVER_80_0.S[12491]++;int i = 0;
__CLOVER_80_0.S[12492]++;String stateful = serviceContext[i++];
__CLOVER_80_0.S[12493]++;String pageName = serviceContext[i++];
__CLOVER_80_0.S[12494]++;if ((((complex) && (++__CLOVER_80_0.CT[2141] != 0)) || (++__CLOVER_80_0.CF[2141] == 0))){
__CLOVER_80_0.S[12495]++;componentPageName = serviceContext[i++];}
else{
__CLOVER_80_0.S[12496]++;componentPageName = pageName;}
__CLOVER_80_0.S[12497]++;String componentPath = serviceContext[i++];
__CLOVER_80_0.S[12498]++;IPage page = cycle.getPage(pageName);
__CLOVER_80_0.S[12499]++;cycle.activate(page);
__CLOVER_80_0.S[12500]++;if ((((complex) && (++__CLOVER_80_0.CT[2142] != 0)) || (++__CLOVER_80_0.CF[2142] == 0))){
__CLOVER_80_0.S[12501]++;componentPage = cycle.getPage(componentPageName);}
else{
__CLOVER_80_0.S[12502]++;componentPage = page;}
__CLOVER_80_0.S[12503]++;IComponent component = componentPage.getNestedComponent(componentPath);
__CLOVER_80_0.S[12504]++;try
{
__CLOVER_80_0.S[12505]++;direct = (IDirect) component;
}
catch (ClassCastException ex)
{
__CLOVER_80_0.S[12506]++;throw new ApplicationRuntimeException(Tapestry.format(
"DirectService.component-wrong-type",
component.getExtendedId()), component, null, ex);
}
// Check for a StateSession only the session was stateful when
// the Gesture was created.
__CLOVER_80_0.S[12507]++;if ((((stateful.equals(STATEFUL_ON) && direct.isStateful()) && (++__CLOVER_80_0.CT[2143] != 0)) || (++__CLOVER_80_0.CF[2143] == 0))){
{
__CLOVER_80_0.S[12508]++;HttpSession session = cycle.getRequestContext().getSession();
__CLOVER_80_0.S[12509]++;if ((((session == null || session.isNew()) && (++__CLOVER_80_0.CT[2144] != 0)) || (++__CLOVER_80_0.CF[2144] == 0))){
__CLOVER_80_0.S[12510]++;throw new StaleSessionException(Tapestry.format(
"DirectService.stale-session-exception",
direct.getExtendedId()), direct.getPage());}
}}
__CLOVER_80_0.S[12511]++;Object[] parameters = getParameters(cycle);
__CLOVER_80_0.S[12512]++;cycle.setServiceParameters(parameters);
__CLOVER_80_0.S[12513]++;direct.trigger(cycle);
// Render the response. This will be the response page (the first element in the context)
// unless the direct (or its delegate) changes it.
__CLOVER_80_0.S[12514]++;_responseRenderer.renderResponse(cycle, output);