Search in sources :

Example 1 with QueryStack

use of lucee.runtime.util.QueryStack in project Lucee by lucee.

the class CFTag method doInclude.

void doInclude() throws PageException {
    Variables var = pageContext.variablesScope();
    pageContext.setVariablesScope(ctVariablesScope);
    QueryStack cs = null;
    Undefined undefined = pageContext.undefinedScope();
    int oldMode = undefined.setMode(Undefined.MODE_NO_LOCAL_AND_ARGUMENTS);
    if (oldMode != Undefined.MODE_NO_LOCAL_AND_ARGUMENTS)
        callerScope.setScope(var, pageContext.localScope(), pageContext.argumentsScope(), true);
    else
        callerScope.setScope(var, null, null, false);
    if (pageContext.getConfig().allowImplicidQueryCall()) {
        cs = undefined.getQueryStack();
        undefined.setQueryStack(new QueryStackImpl());
    }
    try {
        pageContext.doInclude(new PageSource[] { source.getPageSource() }, false);
    } catch (Throwable t) {
        ExceptionUtil.rethrowIfNecessary(t);
        throw Caster.toPageException(t);
    } finally {
        undefined.setMode(oldMode);
        // varScopeData=variablesScope.getMap();
        pageContext.setVariablesScope(var);
        if (pageContext.getConfig().allowImplicidQueryCall()) {
            undefined.setQueryStack(cs);
        }
    }
}
Also used : Variables(lucee.runtime.type.scope.Variables) Undefined(lucee.runtime.type.scope.Undefined) QueryStack(lucee.runtime.util.QueryStack) QueryStackImpl(lucee.runtime.util.QueryStackImpl)

Aggregations

Undefined (lucee.runtime.type.scope.Undefined)1 Variables (lucee.runtime.type.scope.Variables)1 QueryStack (lucee.runtime.util.QueryStack)1 QueryStackImpl (lucee.runtime.util.QueryStackImpl)1