Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring Primefaces<;p:ajax更新="@“全部”/&燃气轮机;不';行不通_Spring_Jsf 2_Primefaces_Liferay 6_Mojarra - Fatal编程技术网

Spring Primefaces<;p:ajax更新="@“全部”/&燃气轮机;不';行不通

Spring Primefaces<;p:ajax更新="@“全部”/&燃气轮机;不';行不通,spring,jsf-2,primefaces,liferay-6,mojarra,Spring,Jsf 2,Primefaces,Liferay 6,Mojarra,我在使用p:ajax更新atribute元素时遇到问题。当我在代码中使用时,我得到的是javax.el.PropertyNotFoundException。当我使用时,我没有得到任何信息。我觉得那几张标签差不多一样。有人能解释发生了什么事吗 我正在使用mojjara实现、PrimeFaces3.5和Liferay jsf portlet桥 stacktrace的示例: 原因:javax.el.PropertyNotFoundException:/pages/views/personForm.xh

我在使用p:ajax更新atribute元素时遇到问题。当我在代码中使用
时,我得到的是
javax.el.PropertyNotFoundException
。当我使用
时,我没有得到任何信息。我觉得那几张标签差不多一样。有人能解释发生了什么事吗

我正在使用mojjara实现、PrimeFaces3.5和Liferay jsf portlet桥

stacktrace的示例:

原因:javax.el.PropertyNotFoundException:/pages/views/personForm.xhtml@95,99 value=“#{personManagementBean.item.contact.phoneNumber}”:无法访问目标,“null”返回null 位于com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:100) 位于org.primefaces.renderkit.InputRenderer.findImplicitConverter(InputRenderer.java:170) 位于org.primefaces.renderkit.InputRenderer.findConverter(InputRenderer.java:190) 位于org.primefaces.renderkit.InputRenderer.getConvertedValue(InputRenderer.java:196) 位于javax.faces.component.UIInput.getConvertedValue(UIInput.java:1030) 位于javax.faces.component.UIInput.validate(UIInput.java:960) 位于javax.faces.component.UIInput.executeValidate(UIInput.java:1233) 位于javax.faces.component.UIInput.processValidators(UIInput.java:698) 位于javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1214) 位于javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1214) 位于javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1214) 位于javax.faces.component.UIForm.processValidators(UIForm.java:253) 位于javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1214)

两个按钮:

<p:commandButton value="not working" action="#{enrollmentManagementBean.cancelEnrollment}">
    <p:ajax update="@all" />
</p:commandButton>
<h:commandButton value="working" action="#{enrollmentManagementBean.cancelEnrollment}">
    <f:ajax render="@all" />
</h:commandButton>                                                                     

OptimuPrime(Primefaces的主要开发人员)表示,
update=“@all”
是一个坏主意,Primefaces没有设计实现它

为了解决这个问题,我所做的是依靠javascript的页面刷新。只需将其放入按钮的
oncomplete
属性中即可

oncomplete="window.location.replace(window.location.href);"

我相信,如果您仍然拥有它,这应该可以解决您的问题,或者在这里作为将来的参考。

您尝试过吗?
无法到达目标,
表明
联系人
null
。你证实了吗?荣克:起初我没有试过,但它确实有效。我对这里发生的事情更加困惑。认为commandButton中的update属性与p:ajax标记中的属性具有相同的功能。BalusC:它是空的(我没有在任何地方初始化它),但是只要我不使用它,代码就可以工作。我认为EL是“空安全的”(如果存在类似的情况:D)。