Working with modal dialogs
Web browser support for modal dialogs is quite limited. To date, there is no standard browser support for rendering a complex modal dialog window. Fortunately, the ICEfaces library includes such a component.
Rendering a simple modal dialog
To render a simple modal dialog with ICEfaces, we can use the<ice:panelPopup>
tag. This tag has a "header" and "body" facet to render the dialog title and message content, respectively.
The modal
attribute of the tag expects a Boolean value that determines whether the dialog is modal or not. When this attribute is set to true, the dialog appears centered over a transparent gray background that covers the entire screen. When this attribute is set to false, the dialog is displayed next to the button and the background is not modified.
<ice:panelGroup style="height: 75px;"> <ice:panelGroup style="float:left"> <ice:outputLabel value="Modal Popup Message" for="modalMessageInput" /> </ice:panelGroup> <...