this.bufferedRequestContext.pushBuffer();
try {
controlParameterStack.addFirst(new ControlParameters()); // ֧��control��Ƕ��
TurbineRunDataInternal rundata = (TurbineRunDataInternal) TurbineUtil.getTurbineRunData(this.request);
Context contextForControl = createContextForControl(params, componentName);
rundata.pushContext(contextForControl, templateName);
try {
if (controlModule != null) {
controlModule.execute();
}
// Control module����ͨ��ע��ControlParameters�ӿ�����template��
String templateOverriden = rundata.getControlTemplate();
if (!isEquals(templateOverriden, templateName)) {
log.debug("Control template has been changed by module: " + templateName + " -> "
+ templateOverriden);
templateName = templateOverriden;
}
if (templateName != null) {
templateName = mappingRuleService.getMappedName(CONTROL_TEMPLATE, templateName);
}
if (templateName != null) {
templateService.writeTo(templateName, new ContextAdapter(contextForControl), rundata
.getResponse().getWriter());
}
} finally {
rundata.popContext();
}
} finally {
controlParameterStack.removeFirst();
content = this.bufferedRequestContext.popCharBuffer();
}