String user = (String)config.get(CONFIGKEY_USER);
String pass = (String)config.get(CONFIGKEY_PASS);
String fullURI = getFullURL(proto, host, port, uri, query).toString();
thost = new TextElement("TUConfigForm.url", fullURI, true, 60, 255);
thost.setExample("http://www.yourserver.com/page.html");
addFormElement("host", thost);
addFormElement("st", new SpacerElement(true, false));
// new radio button element
String[] selectableValues = new String[] {
OPTION_TUNNEL_THROUGH_OLAT_INLINE,
OPTION_TUNNEL_THROUGH_OLAT_IFRAME,
OPTION_SHOW_IN_OLAT_IN_AN_IFRAME,
OPTION_SHOW_IN_NEW_BROWSER_WINDOW
};
String[] selectableLabels = new String[] {
translate(NLS_OPTION_TUNNEL_INLINE_LABEL),
translate(NLS_OPTION_TUNNEL_IFRAME_LABEL),
translate(NLS_OPTION_OLAT_IFRAME_LABEL),
translate(NLS_OPTION_EXTERN_PAGE_LABEL)
};
StaticHTMLTextElement expl = new StaticHTMLTextElement(NLS_DESCRIPTION_LABEL, translate(NLS_DESCRIPTION_PREAMBLE), 32600);
addFormElement("expl", expl);
String loadedConfig = convertConfigToNewStyle(config);
selectables = new RadioButtonGroupElement(true, NLS_DISPLAY_CONFIG_EXTERN, selectableValues, selectableLabels);
selectables.select(loadedConfig, true);
selectables.setNoLabel(true);
selectables.setHTMLIsAllowed(true);
addFormElement("selectables", selectables);
addFormElement("s3", new SpacerElement(false, true));
tuser = new TextElement("TUConfigForm.user", (user == null) ? "" : user, 255);
tpass = new PasswordElement("TUConfigForm.pass", 255);
tpass.setValue((pass == null) ? "" : pass);
addFormElement("user", tuser);
addFormElement("pass", tpass);