Guten Morgen zusammen, bin langsam am Verzweifeln - im Primefaces Showcase (http://www.primefaces.org/showcase/ui/df/basic.xhtml) wird beschrieben, wie eine XHTML-Datei als Dialog aufgerufen werden kann. In diesem Beispiel wird dieses über den Aufruf:

 RequestContext.getCurrentInstance().openDialog("viewCars");

durchgeführt. Habe versucht dieses in einem Event (aufgerufen durch eine p:commandbutton) in einem Skriptstep nachzubauen. Code des Skriptsteps:

import org.primefaces.context.RequestContext;
RequestContext.getCurrentInstance().openDialog("info");

die entsprechende XHTML-Date habe ich über NEW -> HTML DIALOG VIEW erzeugt und liegt im Bereich des Aufrufenden JSF-Dialogs. Der Skriptstep wird ohne Fehlermeldung oder LOG-Eintrag durchlaufen. Auch die Erzeugung einer gleichnamigen XHTML-Datei direkt unter WebContent brachte keinen Erfolg. Was mache ich falsch ?

Herzlichen Dank für die Hilfe

asked 18.07.2015 at 10:11

rschreiter's gravatar image

rschreiter
(suspended)
accept rate: 0%


You are talking about the Primefaces Dialog Framework. I tried out, but was also not able to make it executable.

Have you configured your faces-config.xml as it is requiered?
See: http://stackoverflow.com/questions/17128173/jsf-2-primefaces-opendialog-not-working

Maybe the util class RequestContext is not usable in Ivy...

Is it an option for you to use the simple dialog component of primefaces?
It works fine under Ivy and offers also a lot of nice options.

< p:commandButton value="showDialog" type="button" onclick="PF('dialog').show();" />
< p:dialog header="Dialog" widgetVar="dialog" minHeight="40" >
   < h:outputText value="Hello World!" />
< /p:dialog >

See: http://www.primefaces.org/showcase/ui/overlay/dialog/basic.xhtml

link

answered 23.07.2015 at 15:58

Adrian%20Imfeld's gravatar image

Adrian Imfeld
(suspended)
accept rate: 77%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×79
×51

Asked: 18.07.2015 at 10:11

Seen: 10,756 times

Last updated: 23.07.2015 at 15:58