Revision 47077 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/DefaultExpressionEvaluatorManager.java
DefaultExpressionEvaluatorManager.java | ||
---|---|---|
269 | 269 |
} |
270 | 270 |
} |
271 | 271 |
|
272 |
@Override |
|
273 |
public String evaluateDynamicText(SymbolTable symbolTable, String source, Writer output) { |
|
274 |
return this.evaluateDynamicText(symbolTable, source, output, scriptsResourcesStorage); |
|
275 |
} |
|
272 | 276 |
|
273 | 277 |
@Override |
274 |
public String evaluateDynamicText(SymbolTable symbolTable, String source, Writer output) { |
|
278 |
public String evaluateDynamicText(SymbolTable symbolTable, String source, Writer output, ResourcesStorage resources) {
|
|
275 | 279 |
try { |
276 | 280 |
if (!StringUtils.contains(source, DYNAMICTEXT_STARTTAG)) { |
277 | 281 |
if (output == null) { |
... | ... | |
292 | 296 |
st.addSymbolTable(symbolTable); |
293 | 297 |
} |
294 | 298 |
st.setVar("contents", writer); |
295 |
this.evaluate(st, script); |
|
299 |
|
|
300 |
Compiler compiler = this.createCompiler(); |
|
301 |
DefaultInterpreter interpreter = new DefaultInterpreter(); |
|
302 |
interpreter.setSymbolTable(st); |
|
303 |
if( resources!=null ) { |
|
304 |
interpreter.setResourcesStorage(resources); |
|
305 |
} |
|
306 |
|
|
307 |
Code code = compiler.compileExpression(script); |
|
308 |
interpreter.run(code); |
|
309 |
|
|
296 | 310 |
if (output == null) { |
297 | 311 |
return ((StringWriter) writer.getWriter()).toString(); |
298 | 312 |
} |
Also available in: Unified diff