定位PrimeFaces的OverlayPanel

kar*_*uba 3 overlay position panel primefaces

你能给我一个固定overlayPanel位置的关键/值吗?我想在中间解决它,但我无法弄明白.我有这个例子:

<p:overlayPanel id="overlayPanelSearch" for="searchButton" my="top" at="bottom">
Run Code Online (Sandbox Code Playgroud)

Ala*_*Dee 10

这就是我理解它的方式.
"我的"是覆盖面板框.
"at"是commandButton.

<p:commandButton id="chartBtn" type="button" />  
<p:overlayPanel id="chartPanel" for="chartBtn" my="right top" at="right bottom">  
  ...
</p:overlayPanel>  
Run Code Online (Sandbox Code Playgroud)

所以上面写着:"将覆盖面板的右上方与命令按钮的右下方连接"

  • 你的最后一句完美地解释了它. (2认同)

rag*_*ags 5

使用overlayPanel的以下属性:

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")
Run Code Online (Sandbox Code Playgroud)