throws ServletException, IOException
{
IDirect direct;
int count = 0;
String componentPageName;
IPage componentPage;
RequestContext requestContext = cycle.getRequestContext();
String[] serviceContext = getServiceContext(requestContext);
if (serviceContext != null)
count = serviceContext.length;
if (count != 3 && count != 4)
throw new ApplicationRuntimeException(
Tapestry.getMessage("DirectService.context-parameters"));
boolean complex = count == 4;
int i = 0;
String stateful = serviceContext[i++];
String pageName = serviceContext[i++];
if (complex)
componentPageName = serviceContext[i++];
else
componentPageName = pageName;
String componentPath = serviceContext[i++];
IPage page = cycle.getPage(pageName);
cycle.activate(page);
if (complex)
componentPage = cycle.getPage(componentPageName);