I have a simple Facelet tag:
<ui:composition>
<ui:insert />
</ui:composition>
which is used in order to avoid declaring multiple c:set
tags.
Let's say I registered it in the facelets taglib library with the name view
, and use it like this:
<my:view bean="#{myController}">
<p:inputText value="#{bean.value}>
<p:ajax event="blur" process="@this" listener="#{bean.handleValueChanged}" />
</p:inputText>
</my:view>
The attribute value
is perfectly resolved by p:inputText
, but p:ajax
throws this:
Target Unreachable, identifier 'bean' resolved to null
javax.el.PropertyNotFoundException: Target Unreachable, identifier 'bean' resolved to null
at com.sun.el.parser.AstValue.getTarget(AstValue.java:153)
at com.sun.el.parser.AstValue.invoke(AstValue.java:237)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:302)
at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:39)
at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
at org.primefaces.component.behavior.ajax.AjaxBehaviorListenerImpl.processAjaxBehavior(AjaxBehaviorListenerImpl.java:47)
Is it a bug or expected behavior?
Update: I just tried the same with f:ajax and it worked!
Btw, the environment is as follows:
Glassfish 3.1.2
PF 3.0, 3.2, 3.3
Update2:
This issue with RichFaces
is absolutely identical. Seems to be like a PrimeFaces bug (I'll post an issue on PF bug tracker today).