jsf 2 primefaces openDialog not working?

左心房为你撑大大i 提交于 2019-12-05 21:24:48

问题


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


回答1:


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>


来源:https://stackoverflow.com/questions/17128173/jsf-2-primefaces-opendialog-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!