http://forum.primefaces.org/viewtopic.php?f=3&t=43756
After much trial and error, I settled on the following p:dialog configuration with javascript solution:
Code: Select all
<p:dialog
id="file-select-dialog"
header="Select File"
widgetVar="file-select-dialog"
width="calc(100% - 50px)"
modal="true"
responsive="true"
onShow="positionDialog('#{p:component('file-select-dialog')}')">
Code: Select all
function positionDialog(id) {
var dialog = document.getElementById(id);
var anchor = $("#layout-topbar");
$(dialog).position({
"my": "center top",
"at": "center bottom-10",
"of": $(anchor)
})
}