public void service(IRequestCycle cycle) throws IOException
{
String pageName = cycle.getParameter(ServiceConstants.PAGE);
IPage rawPage = cycle.getPage(pageName);
IExternalPage page = null;
try
{
page = (IExternalPage) rawPage;
}
catch (ClassCastException ex)
{
throw new ApplicationRuntimeException(EngineMessages.pageNotCompatible(
rawPage,
IExternalPage.class), rawPage, null, ex);
}
Object[] parameters = _linkFactory.extractListenerParameters(cycle);
cycle.setListenerParameters(parameters);
cycle.activate(page);
page.activateExternalPage(parameters, cycle);
_responseRenderer.renderResponse(cycle);
}