new ELVariableResolver(facesContext);
Object expression = _expression;
while (expression instanceof ConditionalExpression)
{
ConditionalExpression conditionalExpression =
((ConditionalExpression) expression);
// first, evaluate the condition (and coerce the result to a
// boolean value)
boolean condition =
Coercions.coerceToBoolean(
conditionalExpression.getCondition().evaluate(
variableResolver, s_functionMapper,
ELParserHelper.LOGGER),
ELParserHelper.LOGGER)
.booleanValue();
// then, use this boolean to branch appropriately
expression = condition ? conditionalExpression.getTrueBranch()
: conditionalExpression.getFalseBranch();
}
if (expression instanceof NamedValue)
{
return ((NamedValue) expression).getName();