<p:dialog> position attribute - how to use it?

UI Components for JSF
Post Reply
User avatar
jim@jimtough.com
Posts: 142
Joined: 03 Jun 2011, 18:06
Location: Canada

26 Aug 2011, 16:13

I haven't played with <p:dialog> for a while and I see there is a new attribute named 'position'. I can't find an example of its use in the Showcase and the built-in taglib documentation only says:
Defines where the dialog should be displayed.
Can anyone supply a code sample of how to use 'position' or just provide the valid values if they are an enumeration?
PF 3.0,
Mojarra 2.1.4,
Tomcat 7.0.14,
Eclipse Indigo,
IE 7, Chrome

Image
http://stackoverflow.com/users/346112/jim-tough

Would rather be a Decepticon...

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

26 Aug 2011, 16:20

Hi,

AFAIK "position" uses syntax of jQuery Position plugin. That means - "left top", "right bottom", ... is valid syntax.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

User avatar
jim@jimtough.com
Posts: 142
Joined: 03 Jun 2011, 18:06
Location: Canada

26 Aug 2011, 16:21

I'll check it out. Thanks!
PF 3.0,
Mojarra 2.1.4,
Tomcat 7.0.14,
Eclipse Indigo,
IE 7, Chrome

Image
http://stackoverflow.com/users/346112/jim-tough

Would rather be a Decepticon...

User avatar
jim@jimtough.com
Posts: 142
Joined: 03 Jun 2011, 18:06
Location: Canada

26 Aug 2011, 16:24

You are correct. I just tried "center top" and it worked.
PF 3.0,
Mojarra 2.1.4,
Tomcat 7.0.14,
Eclipse Indigo,
IE 7, Chrome

Image
http://stackoverflow.com/users/346112/jim-tough

Would rather be a Decepticon...

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

26 Aug 2011, 17:25

Decepticons :)

Drake
Posts: 44
Joined: 25 Jan 2011, 10:59

04 Oct 2011, 12:49

Can you post any examples?
I've used

Code: Select all

    
<p:dialog widgetVar="dlgDettaglioPremio" modal="true" header="Dettaglio"
              showEffect="explode" position="center center" width="600" height="500" resizable="false"
              appendToBody="true">
and

Code: Select all

 
<p:dialog widgetVar="dlgDettaglioPremio" modal="true" header="Dettaglio"
              showEffect="explode" position="top" width="600" height="500" resizable="false">
But It doesn't work! The dialog always appears on the bottom right.
Moreover right and bottom borders exceed the displayed space, so I always have to drag the dialog to the center of the page.
WildFly 10.1.0 Final, Mojarra 2.2.15 PrimeFaces 6.2

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 7 guests