protected Expression createXPathTextExpression(String exprText) throws JellyException { return CompositeExpression.parse( exprText, this.jexlFactory ); } }
/** * A helper method to add a new constant text expression */ public void addTextExpression(String text) { addExpression(new ConstantExpression(text)); }
public Object evaluate(JellyContext context) { return evaluateAsString(context); }
CompositeExpression answer = new CompositeExpression(); case('{'): if ( chars.length() > 0 ) { answer.addTextExpression( chars.toString() ); chars.delete(0, chars.length() ); answer.addExpression(factory.createExpression(expr.toString())); expr.delete(0, expr.length()); ++cur; answer.addTextExpression( chars.toString() );
/** * Adds the given Expression object to the current Script. */ protected void addExpressionScript(ScriptBlock script, Expression expression) { if ( expression instanceof ConstantExpression ) { ConstantExpression constantExpression = (ConstantExpression) expression; Object value = constantExpression.getValue(); if ( value != null ) { script.addScript(new TextScript( value.toString() )); } } else if ( expression instanceof CompositeExpression ) { CompositeTextScriptBlock newBlock = new CompositeTextScriptBlock(); script.addScript(newBlock); CompositeExpression compositeExpression = (CompositeExpression) expression; Iterator iter = compositeExpression.getExpressions().iterator(); while (iter.hasNext()) { addExpressionScript( newBlock, (Expression) iter.next() ); } } else { script.addScript(new ExpressionScript(expression)); } }
CompositeExpression answer = new CompositeExpression(); case('{'): if ( chars.length() > 0 ) { answer.addTextExpression( chars.toString() ); chars.delete(0, chars.length() ); answer.addExpression(factory.createExpression(expr.toString())); expr.delete(0, expr.length()); ++cur; answer.addTextExpression( chars.toString() );
/** * Adds the given Expression object to the current Script. */ protected void addExpressionScript(ScriptBlock script, Expression expression) { if ( expression instanceof ConstantExpression ) { ConstantExpression constantExpression = (ConstantExpression) expression; Object value = constantExpression.getValue(); if ( value != null ) { script.addScript(new TextScript( value.toString() )); } } else if ( expression instanceof CompositeExpression ) { CompositeTextScriptBlock newBlock = new CompositeTextScriptBlock(); script.addScript(newBlock); CompositeExpression compositeExpression = (CompositeExpression) expression; Iterator iter = compositeExpression.getExpressions().iterator(); while (iter.hasNext()) { addExpressionScript( newBlock, (Expression) iter.next() ); } } else { if (escapeByDefault) expression = createEscapingExpression(expression); script.addScript(new ExpressionScript(expression)); } }
protected void configureStaticTagAttributes(TagScript script, Attributes list) throws JellyException { // now iterate through through the expressions int size = list.getLength(); for (int i = 0; i < size; i++) { String attributeValue = list.getValue(i); Expression expression = CompositeExpression.parse( attributeValue, getExpressionFactory() ); String attrQName = list.getQName(i); int p = attrQName.indexOf(':'); String prefix = p>=0 ? attrQName.substring(0,p): ""; script.addAttribute(list.getLocalName(i), prefix, list.getURI(i), expression); } }
CompositeExpression answer = new CompositeExpression(); case('{'): if ( chars.length() > 0 ) { answer.addTextExpression( chars.toString() ); chars.delete(0, chars.length() ); answer.addExpression(factory.createExpression(expr.toString())); expr.delete(0, expr.length()); ++cur; answer.addTextExpression( chars.toString() );
public Object evaluate(JellyContext context) { return evaluateAsString(context); }
/** * A helper method to add a new constant text expression */ public void addTextExpression(String text) { addExpression(new ConstantExpression(text)); }
/** * Adds the given Expression object to the current Script. */ protected void addExpressionScript(ScriptBlock script, Expression expression) { if ( expression instanceof ConstantExpression ) { ConstantExpression constantExpression = (ConstantExpression) expression; Object value = constantExpression.getValue(); if ( value != null ) { script.addScript(new TextScript( value.toString() )); } } else if ( expression instanceof CompositeExpression ) { CompositeTextScriptBlock newBlock = new CompositeTextScriptBlock(); script.addScript(newBlock); CompositeExpression compositeExpression = (CompositeExpression) expression; Iterator iter = compositeExpression.getExpressions().iterator(); while (iter.hasNext()) { addExpressionScript( newBlock, (Expression) iter.next() ); } } else { if (escapeByDefault) expression = new EscapingExpression(expression); script.addScript(new ExpressionScript(expression)); } }
protected void configureStaticTagAttributes(TagScript script, Attributes list) throws JellyException { // now iterate through through the expressions int size = list.getLength(); for (int i = 0; i < size; i++) { String attributeValue = list.getValue(i); Expression expression = CompositeExpression.parse( attributeValue, getExpressionFactory() ); String attrQName = list.getQName(i); int p = attrQName.indexOf(':'); String prefix = p>=0 ? attrQName.substring(0,p): ""; script.addAttribute(list.getLocalName(i), prefix, list.getURI(i), expression); } }
CompositeExpression answer = new CompositeExpression(); case('{'): if ( chars.length() > 0 ) { answer.addTextExpression( chars.toString() ); chars.delete(0, chars.length() ); answer.addExpression(factory.createExpression(expr.toString())); expr.delete(0, expr.length()); ++cur; answer.addTextExpression( chars.toString() );
public Object evaluate(JellyContext context) { return evaluateAsString(context); }
/** * A helper method to add a new constant text expression */ public void addTextExpression(String text) { addExpression(new ConstantExpression(text)); }
/** * Adds the given Expression object to the current Script. */ protected void addExpressionScript(ScriptBlock script, Expression expression) { if ( expression instanceof ConstantExpression ) { ConstantExpression constantExpression = (ConstantExpression) expression; Object value = constantExpression.getValue(); if ( value != null ) { script.addScript(new TextScript( value.toString() )); } } else if ( expression instanceof CompositeExpression ) { CompositeTextScriptBlock newBlock = new CompositeTextScriptBlock(); script.addScript(newBlock); CompositeExpression compositeExpression = (CompositeExpression) expression; Iterator iter = compositeExpression.getExpressions().iterator(); while (iter.hasNext()) { addExpressionScript( newBlock, (Expression) iter.next() ); } } else { if (escapeByDefault) expression = new EscapingExpression(expression); script.addScript(new ExpressionScript(expression)); } }
protected void configureStaticTagAttributes(TagScript script, Attributes list) throws JellyException { // now iterate through through the expressions int size = list.getLength(); for (int i = 0; i < size; i++) { String attributeValue = list.getValue(i); Expression expression = CompositeExpression.parse( attributeValue, getExpressionFactory() ); String attrQName = list.getQName(i); int p = attrQName.indexOf(':'); String prefix = p>=0 ? attrQName.substring(0,p): ""; script.addAttribute(list.getLocalName(i), prefix, list.getURI(i), expression); } }
public Object evaluate(JellyContext context) { return evaluateAsString(context); }
/** * A helper method to add a new constant text expression */ public void addTextExpression(String text) { addExpression(new ConstantExpression(text)); }