Reputation: 3880
I tired open dialag on top page.
I add flag position
in map propertis set to top
but not work.
primefaces 6.0
Dialog visible in center.
public void openWindowNotification() {
try {
System.err.println("openWindowNotification");
Map<String, Object> options = new HashMap<String, Object>();
options.put("draggable", false);
options.put("modal", true);
options.put("position", "top"); // <--- not work
options.put("width", "90%");
options.put("contentWidth", "90%");
options.put("height", "90%");
options.put("contentheight", "90%");
options.put("size", "auto");
options.put("widgetVar", "editarDialog");
RequestContext.getCurrentInstance().openDialog("window/WindowNotification", options, null);
} catch (Exception e) {
e.printStackTrace();
}
}
Any ideas ?
edit: fire bug show code:
> <div id="formFindPanel:bAdd_dlg" class="ui-dialog ui-widget
> ui-widget-content ui-corner-all ui-shadow ui-hidden-container
> ui-resizable ui-overlay-visible"
> data-widgetvar="formFindPanel_bAdd_dlgwidget"
> data-pfdlgcid="96e9d80e-f114-49a2-8699-1684bf9e3418" style="width:
> 90%; height: auto; left: 83px; top: 365.5px; visibility: visible;
> z-index: 1001; display: block;" role="dialog"
> aria-labelledby="formFindPanel:bAdd_dlg_title" aria-hidden="false"
> aria-live="polite">
in css is top
propertis 365.5px
what causes that dialog is in center.
I need set to top around ~15px;
Upvotes: 0
Views: 1831
Reputation: 11
You can just set a hard value (e.g 500) to the height, it should work.
Upvotes: 1