use of javax.el.VariableMapper in project tomcat70 by apache.
the class AstIdentifier method isReadOnly.
@Override
public boolean isReadOnly(EvaluationContext ctx) throws ELException {
VariableMapper varMapper = ctx.getVariableMapper();
if (varMapper != null) {
ValueExpression expr = varMapper.resolveVariable(this.image);
if (expr != null) {
return expr.isReadOnly(ctx.getELContext());
}
}
ctx.setPropertyResolved(false);
boolean result = ctx.getELResolver().isReadOnly(ctx, null, this.image);
if (!ctx.isPropertyResolved()) {
throw new PropertyNotFoundException(MessageFactory.get("error.resolver.unhandled.null", this.image));
}
return result;
}
use of javax.el.VariableMapper in project tomcat70 by apache.
the class AstIdentifier method getValueReference.
@Override
public ValueReference getValueReference(EvaluationContext ctx) {
VariableMapper varMapper = ctx.getVariableMapper();
if (varMapper == null) {
return null;
}
ValueExpression expr = varMapper.resolveVariable(this.image);
if (expr == null) {
return null;
}
return expr.getValueReference(ctx);
}
use of javax.el.VariableMapper in project muikku by otavanopisto.
the class WidgetComponentHandler method includeWidget.
private void includeWidget(FaceletContext context, UIComponent parent, String widgetName) {
String path = getWidgetPath(widgetName);
VariableMapper orig = context.getVariableMapper();
context.setVariableMapper(new VariableMapperWrapper(orig));
try {
this.nextHandler.apply(context, null);
context.includeFacelet(parent, path);
} catch (IOException e) {
Logger.getLogger(getClass().getName()).log(Level.SEVERE, "Failed to include widget " + path, e);
} finally {
context.setVariableMapper(orig);
}
}
Aggregations