Search the FirstSpirit Knowledge Base
Hi,
I'm tryng to read global.context("PAGE")["stTestVar"] in a script.
I got this direction, but I'm not sure is the rigth one .
PreviewProduction evaluator = new PreviewProduction(null, us, false, us.getProject().getMasterLanguage(), us.getProject().getTemplateSets().get(0), se, null);
Context ctx = evaluator.getContext();
Object vars = ctx.getVariableNames();
// vars = [#global, inherit_format_conversion, #classloader, #startdate, #mathContext]
Best regards,
Antonio
Hi,
what do you want to achieve?
Which kind of script are we talking about?
Why do you instanciate PreviewProduction (internal non API class)?
Gockel
Hi Sebastian,
I want to get the value of #global.context("PAGE")["stTestVar"] in a workflow script.
Like $CMS_VALUE(#global.context("PAGE")["stTestVar"])$ do in a template.
regards,
Antonio
If you're within a script, there's a predefined variable called "context" that represents the current context. In this case, you'll get a WorkflowScriptContext http://www.e-spirit.com/odfs50/access/de/espirit/firstspirit/access/store/templatestore/WorkflowScri...