Hello everybody.
I tried to use <a4j:support> with Sun's JSF 1.2 RI components, which are supported according to the documentation. Nevertheless I get a ClassCastException on this:
<h:commandLink value="test" action="#{anAction}">
<a4j:support reRender="outputGroup" event="onclick" />
</h:commandLink>
protected void setParentProperties(UIAjaxSupport uiComponent) {
//Find parent UIComponentTag
UIComponentTag componentTag = null;
try {
componentTag = UIComponentTag.getParentUIComponentTag(pageContext);
if (componentTag == null) {
throw new IllegalArgumentException(
Messages.getMessage(Messages.NO_UI_COMPONENT_TAG_ANCESTOR_ERROR, "AjaxSupportTag"));
}
if (componentTag.getCreated()) {
//Component was just created, so we add the Listener
UIComponent component = componentTag.getComponentInstance();
uiComponent.setParentProperties(component);
}
} catch (ClassCastException e) {
// JSF 1.2 - tags have other parent.
}
}