// LAYOUT End
final String clientId = popup.getClientId(facesContext);
// XXX May be computed in the "Layout Manager Phase"
AbstractUIPage page = ComponentUtils.findPage(facesContext);
if (popup.getLeft() == null) {
popup.setLeft(page.getWidth().subtract(popup.getWidth()).divide(2));
}
if (popup.getTop() == null) {
popup.setTop(page.getHeight().subtract(popup.getWidth()).divide(2));
}
writer.startElement(HtmlElements.DIV, popup);
writer.writeIdAttribute(clientId);
Style style = new Style(facesContext, popup);