ConfirmDialog does not show

UI Components for JSF
Post Reply
huof
Posts: 18
Joined: 22 Dec 2010, 17:57

07 Apr 2011, 12:49

Hi all,

I have the following confirm dialog on my page:

Code: Select all

<p:confirmDialog
	message="You are not allowed to greet a person named #{person.firstname}."
	showEffect="explode" header="Access Denied" modal="true"
	severity="alert" widgetVar="accessDeniedDialog"
	visible="#{flashScope.accessIsDenied}">

	<p:commandButton value="Back" onclick="accessDeniedDialog.hide()" type="button" />

</p:confirmDialog>
I have a logic that sets the variable #{flashScope.accessIsDenied} to true if the dialog should be shown.
But even when the variable is true the dialog does not show.

What's wrong?

Regards,
Florian

PS. I am using Primefaces 1.1 (I am currently not able to update).

CeeJay
Posts: 7
Joined: 22 Nov 2010, 20:31

07 Apr 2011, 13:03

i think it isn't possible with visible="#{flashScope.accessIsDenied}" because in the documentation of primefaces
in no attribute visible for the confirmDialog.

the only way i know is something like this

Code: Select all

	<p:commandButton  value="Check"  ajax="true" update="messages growl" actionListener="#{single.saveAndValidate}" onclick="dlgTest.show()"/>
But i think you mean the <p:dialog /> component, because these component have the visible attribute !

huof
Posts: 18
Joined: 22 Dec 2010, 17:57

07 Apr 2011, 13:08

Hi,

That's strange.
Beause for a dialog it works:

Code: Select all

<p:dialog header="Access Denied" modal="true" resizable="false"
	widgetVar="accessDeniedDialog"
	visible="#{flashScope.accessIsDenied}">

	<h:outputText id="adMsg" value="You are not allowed to greet a person named #{person.firstname}" />

	<p:commandButton value="Back" onclick="accessDeniedDialog.hide();" type="button" />
</p:dialog>
So I am asking myself what's the big difference between the two dialogs?

Regards

Andre Froes
Posts: 155
Joined: 16 Mar 2011, 17:24
Location: Brazil - Curitiba

07 Apr 2011, 13:40

I had some problems with dialog, check if your session is scoped
PrimeFaces 3.5 | Glassfish 3.1 | Mojarra 2.1.5 (JSF 2.1)
Netbeans 7.2.1 | JDK1.7 | Java EE 6 | SQL Server 2008
Win7 64 bits | Firefox 10 - Chrome - IE (all unfortunately)

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

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