简体   繁体   English

调整大小时Primefaces对话框错误的位置

[英]Primefaces dialog wrong position on resize

Test it with primefaces demo page , just scroll bottom our window, then press view , it will show a dialog on middle center window, but try resize it, dialog position will float to top. 使用primefaces演示页面测试它,只需滚动我们的窗口,然后按下视图 ,它将在中间中心窗口显示一个对话框,但尝试调整它,对话框位置将浮动到顶部。

please show me how to fix it :(. 请告诉我如何解决它:(。

Sorry about my English skill; 抱歉我的英语技能;

I don´t sure what you want but if you want change first position you can do it different ways: 我不确定你想要什么,但如果你想改变第一个位置,你可以采用不同的方式:

By default dialog is positioned at center of the viewport and position option is used to change the location of the dialog. 默认情况下,对话框位于视口的中心,位置选项用于更改对话框的位置。 Possible values are; 可能的值是;
• Single string value like 'center', 'left', 'right', 'top', 'bottom' representing the position within viewport. •单个字符串值,如“center”,“left”,“right”,“top”,“bottom”表示视口中的位置。
• Comma separated x and y coordinate values like 200, 500 •逗号分隔x和y坐标值,如200,500
• Comma separated position values like 'top','right'. •逗号分隔的位置值,如“顶部”,“右侧”。 (Use single quotes when using a combination) (使用组合时使用单引号)

This you must write in your configuration map that you send: 您必须在您发送的配置图中写入:

Map<String,Object> configurationMap= new HashMap<String, Object>();  
configurationMap.put("position", "top");  
RequestContext.getCurrentInstance().openDialog("nameDialog", configurationMap, null);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM