RichFaces 4.x provides a clean api for popup panels and added non-modal state, so now its easy to use the popup panel for login, and seach panels. The examples below show both variants; login, and search, but of course you could use any content you wanted.

At the bottom of the page is a description and information for RichFaces 3.3.X users who used rich:dropDownMenu components to accomplish this same task. If that was you - it is worth a read.

The rich:popupPanel also allows you to pass options to the JavaScript show method such as: min/max width and height, specific width and height, top and left positions for the panel. So with rich:hashParam it's really simple to build declarative calls for the panel which can use dynamic properties.

In RichFaces 3.3.x many developers used the rich:dropDownMenu component for creation of Search/Login popups attached to toolbars. There were two main reasons for this:

- Simplicity of usage. No script positioning required. rich:dropDownMenu performs popup positioning on its own and was simple to customize by using jointPoint and direction attributes.
- RichFaces 3.3.x has no lightweight popup panel and rich:modalPanel usage for such cases required workarounds in order to make it non-modal

But that approach also has some disadvantages:

- rich:dropDownMenu component was created with additional JavaScript code for input processing inside the rich:menuItem's. That is not really a native task for menus so that code was really superfluous from simple menus point of view.
- Developer still had to work on styling of menu item removing hover effects and making it looks like panel rather than menuItem

We think that the new features of the rich:popupPanel are an excellent replacement for this and hope you will consider updating to it.