facesContext, UIGridLayout.COMPONENT_TYPE, TobagoConstants.RENDERER_TYPE_GRID_LAYOUT, "layout");
box.getFacets().put(TobagoConstants.FACET_LAYOUT, layout);
layout.getAttributes().put(TobagoConstants.ATTR_ROWS, "*;fixed");
layout.getAttributes().put(TobagoConstants.ATTR_MARGIN, "10");
final UICell scrollPanel = (UICell)
ComponentUtil.createComponent(facesContext, UICell.COMPONENT_TYPE, "Cell", "messagePanel");
box.getChildren().add(scrollPanel);
messages.getParent().getChildren().remove(messages);
messages.setConfirmation(false);
scrollPanel.setScrollbars("auto");
scrollPanel.getChildren().add(messages);
UIComponent buttonPanel = ComponentUtil.createComponent(
facesContext, UIPanel.COMPONENT_TYPE, TobagoConstants.RENDERER_TYPE_PANEL, "buttonPanel");
layout = ComponentUtil.createComponent(
facesContext, UIGridLayout.COMPONENT_TYPE, TobagoConstants.RENDERER_TYPE_GRID_LAYOUT, "buttonPanelLayout");
buttonPanel.getFacets().put(TobagoConstants.FACET_LAYOUT, layout);
layout.getAttributes().put(TobagoConstants.ATTR_COLUMNS, "*;100px");
layout.getAttributes().put(TobagoConstants.ATTR_ROWS, "fixed");
box.getChildren().add(buttonPanel);
final UICell space = (UICell)
ComponentUtil.createComponent(facesContext, UICell.COMPONENT_TYPE, "Cell", "space");
buttonPanel.getChildren().add(space);
final UICommand okButton = (UICommand) ComponentUtil.createComponent(
facesContext, UIButtonCommand.COMPONENT_TYPE, TobagoConstants.RENDERER_TYPE_BUTTON, CLOSE_POPUP);