Page 1 of 1

undefined method showMessageInDialog(

Posted: 22 Oct 2019, 21:22
by Dembe
Hello!

I'm new in primefaces, I've joined an existing project, and I would like to open a dialog with a form. In a first time, I've tried to just display a message in a dialog as shown in this page : http://www.primefaces.org/showcase/ui/d ... essage.jsf, but my Eclipse tells me the following error message :
The method showMessageInDialog(FacesMessage) is undefined for the type RequestContext.
Same error if I try the openDialog method.mobdro.bio/ luckypatcher.tips/ kodi.bio/
Here is my faces-config.xml's content:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>

<faces-config
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
    version="2.0">
    <application>
        <action-listener>org.primefaces.application.DialogActionListener</action-listener>
        <navigation-handler>org.primefaces.application.DialogNavigationHandler</navigation-handler>
        <view-handler>org.primefaces.application.DialogViewHandler</view-handler>
    </application>

</faces-config>
Has anyone met the same issue?

Thanks in advance.

Re: undefined method showMessageInDialog(

Posted: 12 Nov 2019, 07:14
by Ninez
I haven't met the same issue, but I saw something similar on stackoverflow
Does it resemble your problem? https://stackoverflow.com/questions/190 ... estcontext

Re: undefined method showMessageInDialog(

Posted: 15 Nov 2019, 22:05
by barrysingh102
The PrimeFaces showcase runs currently PrimeFaces 4.0. Look closer at the version information in the site's footer. The RequestContext#openDialog() was introduced in PrimeFaces 4.0 and is indeed absent in 3.5. This compile error thus suggests that you're using an older version such as 3.5. In that version, you should be calling the show() function on the JavaScript variable referring the dialog which you can specify via widgetVar attribute. Shareit apk vidmate app