Dialog Framework - Basic is not working

UI Components for JSF
Post Reply
seetharaman43
Posts: 18
Joined: 24 Jan 2019, 11:56

16 Apr 2019, 11:31

Dear Team,

I am trying to open a xhtml page in dialog box on click of button as per primeface example.
I have created all the required files and I have noticed "viewCars" function is being called every time when I click the button but the dialog is not appearing.

Could some explain what I have done wrong here or how to debug this further?.

Prime Face version - primefaces-7.0.jar

Regards,

seetharaman43
Posts: 18
Joined: 24 Jan 2019, 11:56

16 Apr 2019, 14:35

This is the code being used to open a dialog page.

public void viewCars() {
Map<String,Object> options = new HashMap<String, Object>();
options.put("resizable", false);
System.out.println("******HI&&&&&&&&&&&&&&&&&&&&&&");
PrimeFaces.current().dialog().openDynamic("viewCars", options, null);

}

Versions:
Primefaces 7.0
Netbeans 8.2
JSF 2.2

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

17 Apr 2019, 13:07

You might have missed the step where you need to add this to your faces-config.xml.

Code: Select all

<?xml version='1.0' encoding='UTF-8'?>
<faces-config version="2.2"
              xmlns="http://xmlns.jcp.org/xml/ns/javaee"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd">
    <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>
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

seetharaman43
Posts: 18
Joined: 24 Jan 2019, 11:56

18 Apr 2019, 07:45

Dear Melloware,

Thank you so much for the great support. It's working after adding faces-config.xml into my project with the below line.

Regards,
Ram

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 59 guests