{
Defense.isAssignable(parameter, ActionServiceParameter.class, "parameter");
ActionServiceParameter asp = (ActionServiceParameter) parameter;
IComponent component = asp.getComponent();
IPage activePage = cycle.getPage();
IPage componentPage = component.getPage();
Map parameters = new HashMap();
boolean stateful = _request.getSession(false) != null;
parameters.put(ServiceConstants.SERVICE, Tapestry.ACTION_SERVICE);
parameters.put(ServiceConstants.COMPONENT, component.getIdPath());
parameters.put(ServiceConstants.PAGE, activePage.getPageName());
parameters.put(ServiceConstants.CONTAINER, activePage == componentPage ? null
: componentPage.getPageName());
parameters.put(ACTION, asp.getActionId());
parameters.put(ServiceConstants.SESSION, stateful ? "T" : null);