P:dialog box giving Uncaught TypeError: Cannot read property 'show' of undefined

UI Components for JSF
Post Reply
ankitacroit09
Posts: 18
Joined: 20 Nov 2017, 08:52

10 Jan 2018, 13:03

I am using the p:dialog box based on button click it should load but its showing the following error :

Uncaught TypeError: Cannot read property 'show' of undefined at HTMLInputElement.onclick

Code: Select all

<input id="seButton" type="button" value="butt"  onclick="PF('moDialog').show()"  > </input>

<p:dialog modal="true" widgetVar="moDialog" id="moDialog1" width="1111" height="500" >
				
				<h:panelGroup>
					<h:form id="selectForm">
					 <h1>Hello Test form </h1>
					</h:form>
				</h:panelGroup>
</p:dialog>

ankitacroit09
Posts: 18
Joined: 20 Nov 2017, 08:52

11 Jan 2018, 04:33

Resolved the problem :) :)

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

11 Jan 2018, 14:16

How? Other users might have the same problem.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

cnavarro117
Posts: 1
Joined: 28 May 2018, 20:59

28 May 2018, 21:02

How ??
ankitacroit09 wrote:
10 Jan 2018, 13:03
I am using the p:dialog box based on button click it should load but its showing the following error :

Uncaught TypeError: Cannot read property 'show' of undefined at HTMLInputElement.onclick

Code: Select all

<input id="seButton" type="button" value="butt"  onclick="PF('moDialog').show()"  > </input>

<p:dialog modal="true" widgetVar="moDialog" id="moDialog1" width="1111" height="500" >
				
				<h:panelGroup>
					<h:form id="selectForm">
					 <h1>Hello Test form </h1>
					</h:form>
				</h:panelGroup>
</p:dialog>

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

29 May 2018, 10:22

Most likely by removing an explicitly added jquery from the page or removing a second PrimeFaces jar from the deployment

charlietran1986
Posts: 29
Joined: 02 Aug 2020, 20:00

02 Aug 2020, 20:10

I have encountered the same problem. In may xhtm file, I'm using many command buttons to call and open dialogs. It is very strange to me that some of these command buttons work well and open dialogs successfully, but others don't. Those command buttons give me Uncaught TypeError: Cannot read property 'show' of undefined. Could any one tell me how to resolve this problem. I'm using Primefaces 8.0, Jsf 2.3, Glassfish 5.1. Thanks in advance!

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 55 guests