Showing posts from October, 2013

Positioning popup at the center of the screen

Sometimes you may want to position af:popup at the center of the screen. At this moment, there is no declarative solution for this usecase. In this post I'm sharing a code snippet that I noticed from Gary Van Matre(Oracle) for the same. This sample uses a Javascript method(showPopupInCenter) for displaying popup relative to an 'empty' af:outputText (kept  hidden ) whose position is decided dynamically. When invoked, the Javascript method for showing popup position the hidden af:outputText to the center of the window, made it visible(with empty content), and then shows the popup relative to it. <?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ""> <f:view xmlns:f= "" xmlns:af= "" > <af:document title= "popupsam