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 LegacyELContext(FacesContext faces) { this.faces = faces; this.resolver = new LegacyELResolver(); this.variables = new DefaultVariableMapper(); }
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 toString() { return this.txt.toString(); } }
/** * Parses the passed string to determine if it's literal or not * * @param in * input String * @return true if the String is literal (doesn't contain <code>#{..}</code> * or <code>${..}</code>) */ public static boolean isLiteral(String in) { ELText txt = parse(in); return txt == null || txt.isLiteral(); }
public void write(FacesContext context) throws IOException { ResponseWriter rw = context.getResponseWriter(); rw.writeText(STOP, 0, 0); // hack to get closing elements this.text.write(rw, ELAdaptor.getELContext(context)); }
public void write(FacesContext context) throws IOException { ResponseWriter out = context.getResponseWriter(); try { ELContext elContext = ELAdaptor.getELContext(context); txt.writeText(out, elContext); //out.writeText(txt.toString(elContext), null); } catch (ELException e) { throw new ELException(this.alias + ": " + e.getMessage(), e.getCause()); } catch (Exception e) { throw new ELException(this.alias + ": " + e.getMessage(), e); } }
public boolean isLiteral() { return txt.isLiteral(); } }
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); } }
/** * Factory method for creating an unvalidated ELText instance. NOTE: All * expressions in the passed String are treated as * {@link com.sun.facelets.el.LiteralValueExpression LiteralValueExpressions}. * * @param in * String to parse * @return ELText instance that knows if the String was literal or not * @throws javax.el.ELException */ public static ELText parse(String in) throws ELException { return parse(null, null, in); }
public Method resolveFunction(String prefix, String localName) { if (this.functions != null) { Function f = (Function) this.functions .get(prefix + ":" + localName); return f.getMethod(); } return null; }
public boolean equals(Object obj) { if (obj instanceof Function) { return this.hashCode() == obj.hashCode(); } return false; }
public String toString() { return this.txt.toString(); }
public boolean isLiteral() { return txt.isLiteral(); } }
public String getText() { return this.txt.toString(); }
public String toString() { return this.txt.toString(); }
public String getText() { return this.txt.toString(); }
public UITextHandler(String alias, ELText txt) { this.alias = alias; this.txt = txt; this.length = txt.toString().length(); }
public String toString(ELContext ctx) { StringBuffer sb = new StringBuffer(); for (int i = 0; i < this.txt.length; i++) { sb.append(this.txt[i].toString(ctx)); } return sb.toString(); }
public String toString() { StringBuffer sb = new StringBuffer(); for (int i = 0; i < this.txt.length; i++) { sb.append(this.txt[i].toString()); } return sb.toString(); }