break;
}
}
if (expressionString != null) {
ExpressionFactory expressionFactory = faceletContext.getExpressionFactory();
MethodExpression action = new TagMethodExpression(value, expressionFactory.createMethodExpression(
faceletContext, expressionString, String.class, ComponentUtils.ACTION_ARGS));
// TODO jsf 1.2
((ActionSource) parent).setAction(new LegacyMethodBinding(action));
}
} else if ("actionListener".equals(mode.getValue())) {
String expressionString = value.getValue();
while (isSimpleExpression(expressionString)) {
if (isMethodOrValueExpression(expressionString)) {
ValueExpression expression
= faceletContext.getVariableMapper().resolveVariable(removeElParenthesis(expressionString));
if (expression == null) {
if (LOG.isDebugEnabled()) {
// when the action hasn't been set while using a composition.
LOG.debug("Variable can't be resolved: value='" + expressionString + "'");
}
expressionString = null;
break;
} else {
expressionString = expression.getExpressionString();
}
} else {
LOG.warn("Only expressions are supported mode=actionListener value='" + expressionString + "'");
expressionString = null;
break;
}
}
if (expressionString != null) {
ExpressionFactory expressionFactory = faceletContext.getExpressionFactory();
MethodExpression actionListener = new TagMethodExpression(value, expressionFactory.createMethodExpression(
faceletContext, expressionString, null, ComponentUtils.ACTION_LISTENER_ARGS));
// TODO jsf 1.2
((ActionSource) parent).setActionListener(new LegacyMethodBinding(actionListener));
}
} else if ("actionFromValue".equals(mode.getValue())) {