public static Object makeExpressionPayload ( String expr ) throws IllegalArgumentException, IllegalAccessException, Exception { FacesContextImpl fc = new FacesContextImpl((ServletContext) null, (ServletRequest) null, (ServletResponse) null); ELContext elContext = new FacesELContext(new CompositeELResolver(), fc); Reflections.getField(FacesContextImplBase.class, "_elContext").set(fc, elContext); ExpressionFactory expressionFactory = ExpressionFactory.newInstance(); ValueExpression ve1 = expressionFactory.createValueExpression(elContext, expr, Object.class); ValueExpressionMethodExpression e = new ValueExpressionMethodExpression(ve1); ValueExpression ve2 = expressionFactory.createValueExpression(elContext, "${true}", Object.class); ValueExpressionMethodExpression e2 = new ValueExpressionMethodExpression(ve2); return Gadgets.makeMap(e2, e); }
public ELText apply(ExpressionFactory factory, ELContext ctx) { int len = this.txt.length; ELText[] nt = new ELText[len]; for (int i = 0; i < len; i++) { nt[i] = this.txt[i].apply(factory, ctx); } return new ELTextComposite(nt); } }
public boolean isLiteral() { return txt.isLiteral(); } }
public ELCacheableTextVariable(ValueExpression ve) { super(ve.getExpressionString()); this.ve = ve; boolean compositeComponentExpression = CompositeComponentELUtils.isCompositeComponentExpression(ve.getExpressionString()); boolean resourceExpression = ResourceELUtils.isResourceExpression(ve.getExpressionString()); this.capabilities = (compositeComponentExpression ? EL_CC : 0) | ( resourceExpression ? EL_RESOURCE : 0); }
public void writeText(ResponseWriter out, ELContext ctx) throws ELException, IOException { for (int i = 0; i < this.txt.length; i++) { this.txt[i].writeText(out, ctx); } }
public void write(Writer out, ELContext ctx) throws ELException, IOException { for (int i = 0; i < this.txt.length; i++) { this.txt[i].write(out, ctx); } }
@Override public String toString() { return _txt.toString(); } }
public String getQName() { return _delegate.getQName(); }
public ContextAwareELException(Location location, String expressionString, String qName, Throwable wrapped) { super(wrapped); //super(wrapped.getMessage()); //_localizedMessage = wrapped.getLocalizedMessage(); //_wrappedException = wrapped; _delegate = new DefaultContextAwareELException(location, expressionString, qName, wrapped); }
public Throwable getWrapped() { return _delegate.getWrapped(); }
public ELText apply(ExpressionFactory factory, ELContext ctx) { int len = this.txt.length; ELText[] nt = new ELText[len]; for (int i = 0; i < len; i++) { nt[i] = this.txt[i].apply(factory, ctx); } return new ELTextComposite(nt); } }
public boolean isLiteral() { return _txt.isLiteral(); } }
public void writeText(ResponseWriter out, ELContext ctx) throws ELException, IOException { for (int i = 0; i < this.txt.length; i++) { this.txt[i].writeText(out, ctx); } }
public String getQName() { return _delegate.getQName(); }
public ELText apply(ExpressionFactory factory, ELContext ctx) { int len = this.txt.length; ELText[] nt = new ELText[len]; for (int i = 0; i < len; i++) { nt[i] = this.txt[i].apply(factory, ctx); } return new ELTextComposite(nt); } }
public boolean isManagedBeanScopeValueExpression() { return (scope != null) && (scopeValueExpression != null || !ELText.isLiteral(scope)); }
public String getQName() { return _delegate.getQName(); }
public boolean isManagedBeanScopeValueExpression() { return (scope != null) && (scopeValueExpression != null || !ELText.isLiteral(scope)); }
public boolean isManagedBeanScopeValueExpression() { return (scope != null) && (scopeValueExpression != null || !ELText.isLiteral(scope)); }
public boolean isLiteral() { return txt.isLiteral(); } }