Hello all !
Im a newb with primefaces and currently using 2.2.1.
I notice i have to manually set the width and the height for the p:dialog in order to display all my dialog contents.
Is there a way to automate this, to autosize the popup dialog to fit the dialog's content, but not to become larger than the screen resolution ?
Thank you !
Autosize for p:dialog to fit content ?
Code: Select all
.ui-dialog {
width: auto !important;
}
By the way. I would glad to see it as default in PrimeFaces. I think dialogs were auto-sized before 2.2.1 and now I have to define width: auto; What do you think? Auto-sized components are better than fix-sized.
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
I agree with you Oleg. But auto and fixed both should be implemented.
-
- Posts: 48
- Joined: 07 Dec 2010, 02:46
The above css works cool, until this happens ...
1. I click on a button that reside inside that dialog
2. Validation occurs
3. p:message for each errornous field are displayed
4. some parts of the original become missing, hidden under the scrollbar or stuffs like texts break apart
Would be very cool if the dialog has a fitToSize() javascript function or autofit attribute.
For now i think i need to define fixed size dialog,
preparing the needed spaces for the p:message at the right side of each field
Using p:messages isnt a good idea since the error messages would be displayed above,
and could 'push' the form down, and hide some of the parts
Any comments on this matter ?
Thank you !
1. I click on a button that reside inside that dialog
2. Validation occurs
3. p:message for each errornous field are displayed
4. some parts of the original become missing, hidden under the scrollbar or stuffs like texts break apart
Would be very cool if the dialog has a fitToSize() javascript function or autofit attribute.
For now i think i need to define fixed size dialog,
preparing the needed spaces for the p:message at the right side of each field
Using p:messages isnt a good idea since the error messages would be displayed above,
and could 'push' the form down, and hide some of the parts
Any comments on this matter ?
Thank you !
Hi,
Auto sized dialogs are possible with this workaround http://ovaraksin.blogspot.com/2011/05/j ... h-and.html
I would propose to introduce an attribute "autoSized" = true / false and include my code into PrimeFaces. It doesn't hirt because the code is only executed for autosized dialogs then. Cagatay?
Auto sized dialogs are possible with this workaround http://ovaraksin.blogspot.com/2011/05/j ... h-and.html
I would propose to introduce an attribute "autoSized" = true / false and include my code into PrimeFaces. It doesn't hirt because the code is only executed for autosized dialogs then. Cagatay?
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
-
- Information
-
Who is online
Users browsing this forum: No registered users and 41 guests