Primefaces 定位基本面覆盖面板

Primefaces 定位基本面覆盖面板,primefaces,position,overlay,panel,Primefaces,Position,Overlay,Panel,你能给我一些键/值来固定一个overlypanel位置吗?我想把它放在中间,但我想不出来。我举了一个例子: <p:overlayPanel id="overlayPanelSearch" for="searchButton" my="top" at="bottom"> 使用OverlyPanel的以下属性: for - Identifier of the target component to show the panel my - Position of the panel r

你能给我一些键/值来固定一个
overlypanel
位置吗?我想把它放在中间,但我想不出来。我举了一个例子:

<p:overlayPanel id="overlayPanelSearch" for="searchButton" my="top" at="bottom">

使用OverlyPanel的以下属性:

for - Identifier of the target component to show the panel
my  - Position of the panel relative to the target (ex: my="left top")
at  - Position of the target relative to the panel (ex: at="left bottom")

这就是我的理解
“我的”是覆盖面板框
“at”是命令按钮

<p:commandButton id="chartBtn" type="button" />  
<p:overlayPanel id="chartPanel" for="chartBtn" my="right top" at="right bottom">  
  ...
</p:overlayPanel>  

...

上面写着:“将覆盖面板的右上角与命令按钮的右下角连接起来”

我认为文档中描述如何使用它是错误的。 它被描述为使用类似“左上角”的东西

尝试使用my=“left-top”at=“left-bottom”并且效果很好


希望这能帮助您..

要将其移动到中间,只需使用
middle

即使刚才提到了
右、左、上、中
,您也可以在x轴和y轴上使用

例如:

<p:overlayPanel id="overlay" my="center top" at="right center">  

由于此请求,此功能可能已在以后添加:

这对我不起作用:@user1667910,发起一个新的帖子你的最后一句话解释得很好。