8

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

Niko
  • 1,054
  • 5
  • 25
  • 52
  • possible duplicate of [Page jsf into dialog not working](http://stackoverflow.com/questions/16671678/page-jsf-into-dialog-not-working) – BalusC Jun 15 '13 at 21:46
  • so does this only work in PM 4.0? i am wondering because it seems like it should work in 3.5 too... – Niko Jun 16 '13 at 11:17
  • i fogot; how can i get PM 4.0 beta? and can I load new contents to my dialog when i click on "next"? id like the user to read and check text after text, how would you do it? – Niko Jun 16 '13 at 11:18
  • 1
    Hi BalusC, the showcase doesn't tell me that it may need PM 4.0... it also doen't tell me that it works on 3.5 explicitly but all the other examples are 3.5 (i think) and on 3.5 the method "openDialog" is not available (eclipse can't find it)... – Niko Jun 17 '13 at 12:52
  • 1
    Since announcement of PF4 show case become inconsistent. I found couple of cases updated to version 4 without disclaimer. I also found one example with separate cases for PF35 and PF4. – wst Sep 04 '13 at 09:20

1 Answers1

28

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>
Nbing
  • 281
  • 3
  • 3