* @param content the component to push as modal dialog
*/
public void pushModalDialog(Component content) {
// wrap the component into a modal foreground dialog with alpha-blended-background
final Panel guiMsgPlace = new Panel("guimsgplace_for_modaldialog");
VelocityContainer inset = new VelocityContainer("inset", VELOCITY_ROOT + "/modalDialog.html", null, null) {
public void validate(UserRequest ureq, ValidationResult vr) {
super.validate(ureq, vr);
// just before rendering, we need to tell the windowbackoffice that we are a favorite for accepting gui-messages.
// the windowbackoffice doesn't know about guimessages, it is only a container that keeps them for one render cycle
List zindexed = (List) wbo.getData("guimessage");
if (zindexed == null) {
zindexed = new ArrayList(3);
wbo.putData("guimessage", zindexed);
}
zindexed.add(new ZIndexWrapper(guiMsgPlace, 10));
}
};
inset.put("cont", content);
inset.put("guimsgplace", guiMsgPlace);
modalPanel.pushContent(inset);
// the links in the panel cannot be clicked because of the alpha-blended background over it, but if user chooses own css style ->
// FIXME:fj:b panel.setEnabled(false) causes effects if there is an image component in the panel -> the component is not dispatched
// and thus renders inline and wastes the timestamp.