Package com.alibaba.citrus.turbine

Examples of com.alibaba.citrus.turbine.Context


        Substitution subst = getSubstitution(pipelineContext);

        String template = trimToNull(subst.substitute(templateName));
        String module = trimToNull(subst.substitute(moduleName));

        Context context = rundata.getContext();
        ControlTool controlTool = getControlTool(context, template, module, rundata);

        // render control
        rundata.getResponse().getWriter(); // ������Ԥ����buffer
        String content = controlTool.render();

        // ����context���Ա����ģ���ܹ���ȡ
        context.put("controlContent", content); // controlContentΪcontrol��Ⱦ�Ľ��
        context.put("controlTarget", template != null ? template : module);

        // �ض�����controlExporter target
        rundata.setRedirectTarget(controlExporterTarget);

        pipelineContext.invokeNext();
View Full Code Here


        TurbineRunDataInternal rundata = (TurbineRunDataInternal) getTurbineRunData(request);
        String target = assertNotNull(rundata.getTarget(), "Target was not specified");

        // ����ض����־��������ض�������Ҫ��ҳ�������
        if (!rundata.isRedirected()) {
            Context context = rundata.getContext();

            renderTemplate(getScreenTemplate(target), context, rundata);

            // layout�ɱ����á�
            if (rundata.isLayoutEnabled()) {
                String layoutTemplateOverride = rundata.getLayoutTemplateOverride();

                if (layoutTemplateOverride != null) {
                    target = layoutTemplateOverride;
                }

                String layoutTemplate = getLayoutTemplate(target);

                if (templateService.exists(layoutTemplate)) {
                    String screenContent = defaultIfNull(bufferedRequestContext.popCharBuffer(), EMPTY_STRING);
                    context.put(SCREEN_PLACEHOLDER_KEY, screenContent);

                    renderTemplate(layoutTemplate, context, rundata);
                }
            }
        }
View Full Code Here

TOP

Related Classes of com.alibaba.citrus.turbine.Context

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.