Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Positioning the OverlayPanel of PrimeFaces

Can you give me the key/values which fix an overlayPanel position? I want to fix it in the middle, but I can't figure it out. I have this example:

<p:overlayPanel id="overlayPanelSearch" for="searchButton" my="top" at="bottom">
like image 278
karatsuba Avatar asked Jul 03 '12 08:07

karatsuba


2 Answers

This is how I understand it.
"my" is the overlay panel box.
"at" is the commandButton.

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

So the above reads: "Connect the right top of the overlay panel with the right bottom of the command button"

like image 68
Alan B. Dee Avatar answered Sep 18 '22 09:09

Alan B. Dee


Use the following attributes of 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")
like image 28
rags Avatar answered Sep 22 '22 09:09

rags