【发布时间】:2012-05-28 07:55:51
【问题描述】:
我有一个简单的 Facelet 标签:
<ui:composition>
<ui:insert />
</ui:composition>
用于避免声明多个c:set 标签。
假设我在 facelets taglib 库中注册了它,名称为 view,并像这样使用它:
<my:view bean="#{myController}">
<p:inputText value="#{bean.value}>
<p:ajax event="blur" process="@this" listener="#{bean.handleValueChanged}" />
</p:inputText>
</my:view>
属性value被p:inputText完美解析,但是p:ajax抛出这个:
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)
这是一个错误还是预期的行为?
更新: 我刚刚用 f:ajax 尝试了同样的方法,它奏效了!
顺便说一句,环境如下:
Glassfish 3.1.2
PF 3.0、3.2、3.3
Update2:
This 问题与RichFaces 完全相同。好像是一个 PrimeFaces 错误(我今天将在 PF 错误跟踪器上发布一个问题)。
【问题讨论】:
-
按照承诺,我在 PF bug tracker 上打开了这个问题:code.google.com/p/primefaces/issues/detail?id=4075
标签: jsf-2 primefaces facelets glassfish-3