protected void setActionListenerProperty(UIComponent component, MethodExpression actionListener) {
if (actionListener != null) {
if (component instanceof ActionSource2) {
ActionSource2 actionSource2 = (ActionSource2) component;
actionSource2.addActionListener(new MethodExpressionActionListener(actionListener));
} else {
throw new IllegalArgumentException(Messages.getMessage(Messages.NO_ACTION_SOURCE2_ERROR, component.getClientId(getFacesContext())));
}
}
}