IExternalPage page = null;
String[] context = getServiceContext(cycle.getRequestContext());
if (context == null || context.length != 1)
throw new ApplicationRuntimeException(
Tapestry.format("service-single-context-parameter", Tapestry.EXTERNAL_SERVICE));
String pageName = context[0];
try
{
page = (IExternalPage) cycle.getPage(pageName);
}
catch (ClassCastException ex)
{
throw new ApplicationRuntimeException(
Tapestry.format("ExternalService.page-not-compatible", pageName),
ex);
}
Object[] parameters = getParameters(cycle);