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 ,
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>
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.Quote from http://blog.primefaces.org/?p=3184:
Please use following syntax:
oncomplete="PF('introViewDialog').show()";