I have a problem with this component
我对这个组件有问题。
when I clik on this button, nothing appears,My Problem is p:dialog is not getting displayed,Please I need your help ,
当我按下这个按钮时,什么也没有出现,我的问题是p:对话框没有显示出来,请帮忙,
I worked on primefaces 5.2 Liferay 6.2 , SDK 6.2 .
<p:commandButton id="selectButton" icon="ui-icon-search" title="View" oncomplete="introViewDialog.show()"
update=":form:displayForm" immediate="true" value="lister" >
<f:setPropertyActionListener target="#{introBean.selectedIntro}" value="#{intro}"/>
</p:commandButton>
my form :
我的表格:
<h:form id="displayForm">
<p:dialog id="displayDialog" header="Afficher" widgetVar="introViewDialog" resizable="false" showEffect="clip" hideEffect="fold" appendToBody="true">
<h:panelGrid id="display" columns="2" cellpadding="4">
<h:outputText value=" id :" />
<h:outputText value="#{introBean.selectedIntro.id}" />
<h:outputText value="titre :" />
<h:outputText value="#{introBean.selectedIntro.titre}" />
<h:outputText value="dateDebut :" />
<h:outputText value="#{introBean.selectedIntro.dateDeb}" />
<h:outputText value="desc :" />
<h:outputText
value="#{introBean.selectedIntro.desc}" />
<h:outputText value="active :"
rendered="#{introBean.selectedIntro.active}" />
<h:outputText
value="Elementdeclancheur"
rendered="#{introBean.selectedIntro.elementdeclancheur}" />
<h:outputText value="RTL :"
rendered="#{introBean.introVO.rtl}" />
<h:outputText value="jsOnComplete :" />
<h:outputText value="#{introBean.introVO.jsOnComplete }" />
<h:outputText value="themeCss :" />
<h:outputText value="#{introBean.introVO.themeCss}" />
</h:panelGrid>
</p:dialog>
</h:form>
1 个解决方案
#1
1
You are accessing the widgetVar via following code oncomplete="introViewDialog.show()"
. This won't work on PF5.2, since it is deprecated in PF4 and removed in PF5. There should be an error in your browser console.
通过下面的代码oncomplete=“introViewDialog.show()”访问widgetVar。这不会在PF5.2上起作用,因为它在PF4中被弃用,在PF5中被删除。您的浏览器控制台应该有一个错误。
Quote from http://blog.primefaces.org/?p=3184:
引用http://blog.primefaces.org/?p=3184
In 4.0, widgetVar.method() usage to access the client side api of a component has been deprecated in favor of PF(‘widgetVar’).show() to keep the window scope clean.
在4.0中,widgetVar.method()用于访问组件的客户端api的方法已被放弃,以支持PF(' widgetVar ').show(),以保持窗口范围的清洁。
Please use following syntax: oncomplete="PF('introViewDialog').show()";
请使用以下语法:oncomplete="PF('introViewDialog').show()";
#1
1
You are accessing the widgetVar via following code oncomplete="introViewDialog.show()"
. This won't work on PF5.2, since it is deprecated in PF4 and removed in PF5. There should be an error in your browser console.
通过下面的代码oncomplete=“introViewDialog.show()”访问widgetVar。这不会在PF5.2上起作用,因为它在PF4中被弃用,在PF5中被删除。您的浏览器控制台应该有一个错误。
Quote from http://blog.primefaces.org/?p=3184:
引用http://blog.primefaces.org/?p=3184
In 4.0, widgetVar.method() usage to access the client side api of a component has been deprecated in favor of PF(‘widgetVar’).show() to keep the window scope clean.
在4.0中,widgetVar.method()用于访问组件的客户端api的方法已被放弃,以支持PF(' widgetVar ').show(),以保持窗口范围的清洁。
Please use following syntax: oncomplete="PF('introViewDialog').show()";
请使用以下语法:oncomplete="PF('introViewDialog').show()";