if (value != null) {
result.append(value);
}
} catch(ConfigurationException confEx) {
throw new PatternException("Cannot get variable '" + variable +
"' in expression '" + this.expression + "'", confEx);
}
}
break;
case STATEFUL_MODULE :
{
InputModule module = null;
String moduleName = (String)items.get(++i);
String variableName = (String)items.get(++i);
try {
module = (InputModule)this.selector.select(moduleName);
Object value = module.getAttribute(variableName, null, ContextHelper.getObjectModel(this.context));
if (value != null) {
result.append(value);
}
} catch(ComponentException compEx) {
throw new PatternException("Cannot get module '" + moduleName +
"' in expression '" + this.expression + "'", compEx);
} catch(ConfigurationException confEx) {
throw new PatternException("Cannot get variable '" + variableName +
"' in expression '" + this.expression + "'", confEx);
} finally {
this.selector.release(module);
}