CreateFedlet.jsp revision e8721886dbfd32e88cc7077cbee4b6bb1b44b443
320N/A $Id: CreateFedlet.jsp,v 1.13 2009/08/14 18:32:47 asyhuang Exp $
320N/A<%@taglib uri="/WEB-INF/jato.tld" prefix="jato" %>
320N/A<%@taglib uri="/WEB-INF/cc.tld" prefix="cc" %>
320N/A request.setCharacterEncoding("UTF-8");
320N/A locale="<%=((com.sun.identity.console.base.AMViewBeanBase)viewBean).getUserLocale()%>"/>
320N/A<cc:header name="hdrCommon" pageTitle="webconsole.title" bundleID="amConsole" copyrightYear="2008" fireDisplayEvents="true">
320N/A<script language="javascript" src="../console/js/am.js"></script>
493N/A<script language="javascript" src="../console/js/tasksPage.js"></script>
493N/A<script language="javascript" src="../com_sun_web_ui/js/dynamic.js"></script>
320N/A<div id="main" style="position: absolute; margin: 0; border: none; padding: 0; width:auto; height:101%;">
<div id="divhelp" style="display: none; position:absolute; margin: 0; border: 1px solid #AABCC8; padding: 0; width:400px; height:200px; background:#FCFCFC">
<img src="../console/images/tasks/close.gif" width="16" height="16" onClick="hideHelp()" />
return confirm("<cc:text name="txtLogout" defaultValue="masthead.logoutMessage" bundleID="amConsole"/>");
getCircleOfTrust(radio.value);
if(choiceCOT.length>0) {
cotSelect(choiceCOT.options[0]);
getIDP(radio.value);
if (idpobj.options.length > 1) {
var frm = document.forms['CreateFedlet'];
if (realmobj.options.length < 2) {
if (cotobj.options.length < 2) {
if (idpobj.options.length < 2) {
<cc:primarymasthead name="mhCommon" bundleID="amConsole" logoutOnClick="return confirmLogout();" locale="<%=((com.sun.identity.console.base.AMViewBeanBase)viewBean).getUserLocale()%>"/>
<cc:pagetitle name="pgtitle" bundleID="amConsole" pageTitleText="page.title.create.fedlet" showPageTitleSeparator="true" viewMenuLabel="" pageTitleHelpMessage="" showPageButtonsTop="true" showPageButtonsBottom="false" />
<cc:text name="txtDesc" defaultValue="page.desc.create.fedlet" bundleID="amConsole" />
var msgCreating = "<p><img src=\"../console/images/processing.gif\" width=\"66\" height\"66\"/></p><cc:text name="txtConfiguring" defaultValue="creating.fedlet.waiting" bundleID="amConsole" escape="false" />";
var ttlCreated = "<h3><cc:text name="txtTtlCreated" defaultValue="fedlet.created.title" escape="false" bundleID="amConsole" /></h3>";
var msgCreated = "<p> </p><input name=\"btnOK\" type=\"submit\" class=\"Btn1\" value=\"<cc:text name="txtOKBtn" defaultValue="ajax.ok.button" bundleID="amConsole" />\" onClick=\"document.location.replace(\'../task/Home\');return false;\" /></div></p>";
var closeBtn = "<p> </p><p><div class=\"TtlBtnDiv\"><input name=\"btnClose\" type=\"submit\" class=\"Btn1\" value=\"<cc:text name="txtCloseBtn" defaultValue="ajax.close.button" bundleID="amConsole" />\" onClick=\"focusMain();return false;\" /></div></p>";
var msgMissingAttrMappingValues = "<cc:text name="txtMissingAttrValues" defaultValue="configure.provider.missing.attribute.mapping.values" bundleID="amConsole" escape="false" />" + "<p>" + closeBtn + "</p>";
var frm = document.forms['CreateFedlet'];
btn1.onclick = submitPage;
btn2.onclick = cancelOp;
var userLocale = "<%= viewBean.getUserLocale().toString() %>";
document.getElementById('dlg').innerHTML = '<center>' +
var url = "../console/ajax/AjaxProxy.jsp";
'&class=com.sun.identity.workflow.CreateFedlet' + getData();
var rows = table.getElementsByTagName('TR');
for (var i = rows.length-1; i >=3; --i) {
attrMappings += cb.getAttribute("value") + '|';
if (ajaxObj.readyState == 4) {
var result = hexToString(ajaxObj.responseText);
document.getElementById('dlg').innerHTML = msg;
var url = "../console/ajax/AjaxProxy.jsp";
'&class=com.sun.identity.workflow.GetCircleOfTrusts' +
clearOptions(frm, 'CreateFedlet.choiceIDP');
var url = "../console/ajax/AjaxProxy.jsp";
'&class=com.sun.identity.workflow.GetHostedIDPs' +
if (ajaxObj.readyState == 4) {
var result = hexToString(ajaxObj.responseText);
result = result.replace(/^\s+/, '');
result = result.replace(/\s+$/, '');
if (result.length == 0) {
var cots = result.split('|');
for (var i = choiceCOT.length - 1; i>=0; i--) {
choiceCOT.remove(i);
for (var i = 0; i < cots.length; i++) {
choiceCOT.options[i] = new Option(cots[i], cots[i]);
selectOption(frm, 'CreateFedlet.choiceCOT', presetcot);
document.getElementById('dlg').innerHTML = msg;
if (ajaxObj.readyState == 4) {
var result = hexToString(ajaxObj.responseText);
result = result.replace(/^\s+/, '');
result = result.replace(/\s+$/, '');
if (result.length == 0) {
var idps = result.split('|');
for (var i = 0; i < idps.length; i++) {
choiceIDP.options[i] = new Option(idps[i], idps[i]);
document.getElementById('dlg').innerHTML = msg;
name = name.replace(/^\s+/, '');
name = name.replace(/\s+$/, '');
assertn = assertn.replace(/^\s+/, '');
assertn = assertn.replace(/\s+$/, '');
document.getElementById('dlg').innerHTML = '<center>' +
var tBody = table.getElementsByTagName("TBODY").item(0);
var row = document.createElement("TR");
var cell1 = document.createElement("TD");
var cell2 = document.createElement("TD");
var cell3 = document.createElement("TD");
cell1.setAttribute("align", "center");
cell1.setAttribute("valign", "top");
var cb = document.createElement("input");
var textnode1 = document.createTextNode(assertn);
var textnode2 = document.createTextNode(name);
cb.setAttribute("type", "checkbox");
cb.setAttribute("value", assertn + "=" + name);
cb.onclick = function() {toggleTblButtonState('CreateFedlet', 'CreateFedlet.tblattrmapping', 'tblButton', 'CreateFedlet.deleteAttrMappingBtn', this);};
cell1.appendChild(cb);
cell2.appendChild(textnode1);
cell3.appendChild(textnode2);
row.appendChild(cell1);
row.appendChild(cell2);
row.appendChild(cell3);
tBody.appendChild(row);
var nodes = document.getElementsByTagName("table");
var len = nodes.length;
var rows = table.getElementsByTagName('TR');
for (var i = rows.length-1; i >=3; --i) {
if (cb.checked) {
table.deleteRow(i-1);
ccSetButtonDisabled('CreateFedlet.deleteAttrMappingBtn', 'CreateFedlet', true);
String cot = request.getParameter("cot");
String idp = request.getParameter("entityId");
if ((cot != null) && (cot.trim().length() > 0)) {
out.println("hideRealmObjs();");
out.println("hideIDPObjs();");
out.println("presetcot = \"" + cot + "\";");
out.println("hideRealm();");
str = str.replace(/"/g, '"');
str = str.replace(/</g, '<');
str = str.replace(/>/g, '>');
var infoRealm = unescapeQuote("<cc:text name="txtInfoRealm" defaultValue="create.fedlet.help.realm" bundleID="amConsole" />");
var infoEntityId = unescapeQuote("<cc:text name="txtInfoEntityId" defaultValue="create.fedlet.help.entity.id" bundleID="amConsole" />");
var infoAssertConsumer = unescapeQuote("<cc:text name="txtInfoAssertConsumer" defaultValue="create.fedlet.help.assert.consumer" bundleID="amConsole" />");
var infoMenuUserAttributes = unescapeQuote("<cc:text name="txtInfoMenuUserAttributes" defaultValue="configure.provider.help.user.attributes.choices" bundleID="amConsole" />");