So far everything has gone well with one rather glaring exception: there is no documentation about the options that can be set for them other than a rather vague "similar to the component attributes like modal, resizable etc." Apart from the fact that this kind of documentation always ends up being the last thing to be done, which is at worst frustrating, it means that I am unable to fulfil a requirement that all dialogs be positioned at the top of the page and centered horizontally. This is easily done using position="center top" with the p:dialog tag but only causes JavaScript errors when I try
The requirement stems from the fact that the app is often used on screens with 1024x640 resolution (tablets) and the dialogs extend down and to the left when they resize to fit content.
Code: Select all
Map<String, Object> dialogOptions = new HashMap<>();
dialogOptions.put("modal", Boolean.TRUE); // This works fine
dialogOptions.put("position", "center top"); // This causes JavaScript to throw tantrums
RequestContext.getCurrentInstance().openDialog(dialogOutcome, dialogOptions, null);
Is there any complete list of options and acceptable values around?
If not, how do I get the dialogs to be positioned top and centered?
Edit: User Guide gives the following as list of options: modal, resizable, draggable, width, height,contentWidth, contentHeight.
Looks like I am going to be grinding my teeth in frustration on this one as even 5.1 does not support the full range of options that the p:dialog does.