使用 Apache CODI 评估 ResourceHandler 中的 ValueExpression
我的 Web 应用程序在带有 Apache CODI 1.0.1 的 Websphere 8.0.0.2 上运行,我遇到了与 primefaces 的 ResourceHandler 实现相关的问题。
Primefaces 计算资源处理程序中的值表达式以检索动态内容,原因和方式并不重要。事实上,ResourceHandler 在 JSF 生命周期中的所有其他内容之前被调用。
我正在使用 ViewAccessScope 作为 bean,该 bean 应该使用 ResourceHandler 中的值表达式进行评估。我调试了一下,发现 ValueExpression 的 CODI-Wrapper 尝试检索 FacesContext 的视图根,或更准确地说是它的视图 id。问题是,此时视图根为 null,因此评估以 CODI 类中的 NullPointerException 结束。
谁负责这个问题,我应该在哪个问题跟踪器上发布错误? 我也很感激有关解决方法的建议:D
My Webapp is running on Websphere 8.0.0.2 with Apache CODI 1.0.1 and I have an issue related to the ResourceHandler implementation of primefaces.
Primefaces evaluates a value expression within the resource handler to retrieve dynamic content, why and how is not important. The fact is, that the ResourceHandler is called before everything else within the JSF Lifecycle.
I am using the ViewAccessScope for the bean which should be evaluated with the value expression within the ResourceHandler. I debugged into it and found out that the CODI-Wrapper for the ValueExpression tries to retriev the view root of the FacesContext or more exactly the view id of it. The problem is, that the view root is null at that time, so the evaluation ends with a NullPointerException in a CODI class.
Who is responsible for this issue, on which issue tracker should i post a bug?
I would also appreciate suggestions for workarounds :D
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果
NullPointerException
不是由您作为最终用户可以控制的任何参数/变量引起的,并且它不是 < em>显式被代码抛出或断言,那么它可能是 CODI 类中的错误。向 CODI 报告。If the
NullPointerException
isn't caused by any of the arguments/variables which you, as enduser, can have control over, and it's not explicitly been thrown or asserted by the code, then it's likely a bug in the CODI class. Report it to CODI.我找到的解决方案:
http://myfaces.markmail.org/thread/kuoredrgrpqnfwgl
含义:
http://code.google.com/p/primefaces/issues /detail?id=3549#c4
或
http://forum.primefaces.org/viewtopic.php ?f=3&t=17609&p=57393#p57393
Solutions I found:
http://myfaces.markmail.org/thread/kuoredrgrpqnfwgl
impl.:
http://code.google.com/p/primefaces/issues/detail?id=3549#c4
or
http://forum.primefaces.org/viewtopic.php?f=3&t=17609&p=57393#p57393