// that a component from a page different than
// the response page will render.
// In 1.0.6, we start to record *both* the render page
// and the component page (if different).
IPage activePage = cycle.getPage();
IPage componentPage = component.getPage();
Map parameters = new HashMap();
boolean stateful = _request.getSession(false) != null;
parameters.put(ServiceConstants.SERVICE, Tapestry.DIRECT_SERVICE);
parameters.put(ServiceConstants.PAGE, activePage.getPageName());
parameters.put(ServiceConstants.COMPONENT, component.getIdPath());
parameters.put(ServiceConstants.CONTAINER, componentPage == activePage ? null
: componentPage.getPageName());
parameters.put(ServiceConstants.SESSION, stateful ? "T" : null);
parameters.put(ServiceConstants.PARAMETER, dsp.getServiceParameters());
return _linkFactory.constructLink(cycle, parameters, true);
}