jsf 2 primefaces openDialog not working?

Niko picture Niko · Jun 15, 2013 · Viewed 15.3k times · Source

i am trying to use the Dialog-Framework of Primefaces, but I already stuck at the setting-up:

http://www.primefaces.org/showcase/ui/dialogFrameworkBasic.jsf

Here an excerpt:

Map<String,Object> options = new HashMap<String, Object>();  
options.put("modal", true);  
options.put("draggable", false);  
options.put("resizable", false);  
options.put("contentHeight", 320); 
RequestContext.getCurrentInstance().openDialog("showBundle", options, null); 

it seems, that the method "opendialog(...)" does not exist at all.

can anyone help? How can I show up a modal xhtml-page (jsf) on a page?

I want to show a 'wizard' to update some data in a database (e.g. name, adress on first page, picture and job at second page, etc.); so i thought a modal dialog would solve that (with a "next" button). is this the right way or is there a better approach?

best regards

Answer

Nbing picture Nbing · Sep 13, 2013

In faces-config.xml added:

<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>