final ActionSource actionSource = (ActionSource) parent;
if (forComponent.isLiteral()) {
actionSource.addActionListener(new PopupActionListener(forComponent.getValue()));
} else {
final ValueExpression forValueExpression = forComponent.getValueExpression(faceletContext, String.class);
actionSource.addActionListener(new ValueExpressionPopupActionListener(forValueExpression));
}
}
} else {
throw new TagException(tag, "Parent is not of type ActionSource, type is: " + parent);
}