[BUG] 3.0.RC2 dialog not centered vertically!

UI Components for JSF
djmj
Posts: 400
Joined: 16 Dec 2011, 01:23

25 Dec 2011, 18:03

JSF - Mojarra 2.0
Server - Glassfish 3.01 web

If i define a dialog like: (using position with center gives same result)

Code: Select all

<p:dialog id="dlg" header="dialog" widgetVar="dlgVar" 
	width="575" height="650" resizable="false" modal="true">
	<!-- content -->
</p:dialog>
Edit: it does not get vertically centered, only horizontally.

In showcase it is centered both vertically and horizontally. http://www.primefaces.org/showcase-labs ... Dialog.jsf
Last edited by djmj on 25 Dec 2011, 19:26, edited 5 times in total.
Primefaces: 11.0.0 RC2
Primefaces-Extension: 11.0.0
PrimeFaces-Mobile: 11.0
OmniFaces: 3.11
Jsf: Mojarra 2.3.8
Server: Glassfish 5.1.0

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

25 Dec 2011, 18:11

It's expected, look in the dom of dialog in more detail. You'll find out why.

djmj
Posts: 400
Joined: 16 Dec 2011, 01:23

25 Dec 2011, 19:11

ok i think i found what you meant, but it does not changes the fact that vertically the dialog is not centered.

Sorry i did not made that clear in my post, if you need full code i can post it. (edited first post)
Primefaces: 11.0.0 RC2
Primefaces-Extension: 11.0.0
PrimeFaces-Mobile: 11.0
OmniFaces: 3.11
Jsf: Mojarra 2.3.8
Server: Glassfish 5.1.0

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

26 Dec 2011, 01:12

Try with 3.0 snapshot.

ermal
Posts: 6
Joined: 06 Mar 2012, 19:36

12 Mar 2012, 17:52

I have same problem centering dialogs in my web application.

The dialogs defined as below are not centered in the page (Worst case is when I have a table with many records the dialog disappeared)

<p:confirmDialog widgetVar="confirmation" width="400" severity="alert" position="center">
....
</p:confirmDialog >


Is this a bug? There is any known workaround to avoid this?

Thanks in advance for any clarification on this matter.
Ermal

Primefaces: 3.0 final
Jsf: Mojarra 2.0.3-FCS
Server: Tomcat7
Browser: Firefox 10.0.2
Last edited by ermal on 12 Mar 2012, 17:58, edited 1 time in total.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

12 Mar 2012, 17:57

Can you replicate at showcase? It has lots of dialogs.

ermal
Posts: 6
Joined: 06 Mar 2012, 19:36

12 Mar 2012, 18:23

In showcase the dialogs seems fine. Tag position="center" is not even used...

Am I missing something on how to use appropriately the confirm dialogs?

torquatro
Posts: 25
Joined: 06 Aug 2010, 21:58
Contact:

23 Mar 2012, 22:15

I had the same problem.

My page is large vertically, so when using op: confirmDialog it is not shown.

Checking the source code, I found the css attribute "top" was the value 980px. But my page has a maximum of 900px.
Then the confirmDialog is not shown.

I solved this as follows:

Code: Select all

confirmation.content.parent().css('top',  '100px');
on this part

Code: Select all

<p:commandButton disabled="#{ not empty pedidoBean.pedido.notaFiscal or empty pedidoBean.pedido.id }" 
		value="Gerar Nota Fiscal" image="ui-icon-arrowthick-1-ne"
		onclick="confirmation.show(); confirmation.content.parent().css('top',  '100px');" type="button"/>	
	
	
	<p:confirmDialog message="Realmente deseja gerar uma Nota Fiscal a partir desse pedido? (O pedido não poderá mais ser alterado)" modal="true"
				header="Atenção" widgetVar="confirmation" showEffect="fade">
		<p:commandButton value="Sim" oncomplete="confirmation.hide(); geracaoNotaCompleta(xhr, status, args);"
					action="#{ pedidoBean.gerarNotaFiscal }" image="ui-icon ui-icon-check"/>
		<p:commandButton value="Não" onclick="confirmation.hide()" type="button" image="ui-icon ui-icon-close" /> 
	</p:confirmDialog>


Any suggestion?
Eclipse June, Tomcat 7, PrimeFaces 3.3.1, Mojarra 2.0.6
Sisagil.com - Agilidade para as melhores empresas

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

24 Mar 2012, 03:18

Try with a new version. 3.2 is already released.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

felipecaparelli
Posts: 10
Joined: 19 Oct 2012, 16:33

17 Apr 2015, 15:59

I have this problem too. But it occurs when I try to reuse the same dialog with different callers (and messages). The confirmDialog doesn't reset the position, generated in the first time it was opened. Do you have any suggestion to reset the confirmDialog position when it is reopened?

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

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