else
{
returnIdString = null;
}
CoreOutputText headStart = new CoreOutputText();
root.getChildren().add(headStart);
headStart.setEscape(false);
headStart.setValue("<head>");
CoreImportScript cis = new CoreImportScript();
cis.setNames(new String[]{"Core"});
root.getChildren().add(cis);
// The block-reload script only happens to work on IE, but may someday
// work on Mozilla as well.
HtmlScript script = new HtmlScript();
script.setText(_BLOCK_RELOAD_TEXT + _FIX_DIALOG_TITLE);
root.getChildren().add(script);
CoreOutputText headEnd = new CoreOutputText();
root.getChildren().add(headEnd);
headEnd.setEscape(false);
headEnd.setValue("</head>");
HtmlFrame contentFrame = new HtmlFrame();
String contentStr = arc.getTranslatedString(_FRAME_CONTENT);
if (contentStr == null)
contentStr = _DEFAULT_CONTENT_STRING;
contentFrame.setShortDesc(contentStr); // for accessibility
contentFrame.setLongDescURL("#"); // for accessibility
contentFrame.setHeight("100%");
contentFrame.setWidth("100%");
// Get the query string.
// trim out any "_t" parameter, which was only used to get here.
// trim out any sizing parameters
// trim out any redirect parameters
String queryString = _getQueryString(
context.getExternalContext().getRequestParameterValuesMap());
// grab any sizing parameters. We convert these to their parsed parameters to avoid
// cross site scripting injects attacks
Integer width = JspUtils.integerValueOfParam(requestParameters, _MIN_WIDTH_PARAM);
boolean gotWidth = (width != null);
Integer height = JspUtils.integerValueOfParam(requestParameters, _MIN_HEIGHT_PARAM);
boolean gotHeight = (height != null);
String viewIdRedirect = requestParameters.get(_VIEW_ID_REDIRECT_PARAM);
if (viewIdRedirect != null)
{
ViewHandler vh =
context.getApplication().getViewHandler();
// Prepend an extra slash to avoid re-prepending the context path
String redirectString = "/" + vh.getActionURL(context,
viewIdRedirect);
// if redirectString contains ?, append queryString with &,
// otherwise append queryString with &
char sep = (redirectString.indexOf('?') != -1) ? '&' : '?';
contentFrame.setSource(redirectString + sep + queryString);
}
else
{
String internalRedirect = requestParameters.get("_red");
if (internalRedirect != null)
{
String path = GenericEntry.getGenericEntryURL(context,
internalRedirect);
// Prepend an extra slash to avoid re-prepending the context path
contentFrame.setSource("/" + path + "&" + queryString);
}
}
HtmlFrameBorderLayout frameSet = new HtmlFrameBorderLayout();
frameSet.setShortDesc(contentStr); // for accessibility
frameSet.setCenter(contentFrame);
// this border attribute is a "secret" attribute set to fix
// 4339153 DIALOGS IN FIREFOX HAVE WHITE LINE AT THE BOTTOM
frameSet.getAttributes().put("border", Boolean.FALSE);
// see bug 3198336 apss accessibility violations
CoreOutputText alternateContent = new CoreOutputText();
alternateContent.setValue(arc.getTranslatedString("NO_FRAMES_MESSAGE"));
frameSet.setAlternateContent(alternateContent);
// Set the title to the title of the content, and then shrink (or expand)
// the window to fit the content. The 25 pixel fudge factor is purely
// a hack to handle calendarDialog, which regularly needs to grow