Lukas, Here are the files.
-----Original Message----- From: Lukasz Lenart <[email protected]> Sent: Friday, June 7, 2024 11:45 AM To: Struts Users Mailing List <[email protected]> Subject: [EXTERNAL] Re: POP Up Data List Window Struts 6.4 (and 6.3) v 6.1.2.1 ⚠️ WARNING STOP: Do you recognize this sender? This email originated from outside of the organization and should be treated with EXTREME CAUTION. DO NOT click links or open attachments unless you are ABSOLUTELY CERTAIN the contents are safe. Not sure? Forward this email to [email protected]. ⚠️ WARNING pt., 7 cze 2024 o 14:49 Nordmeyer, William, E (Serco NA) <[email protected]> napisał(a): > We are looking to upgrade to Struts 6.4 and seeing issues with our PoP up > data list window. They worked in 6.1.2.1 but in 6.4, the data appears to be > in the HTML but the screens are not rendering. > > The EmployeeID isn’t populating. The RSUPER isn’t expanding to drill > down > > The data that appears is different. > Double-clicking a Responsible Super with a + beside it does NOT > expand/drilldown in 6.4.0. Could you share your JSP page and the rendered Html? > See attached Screenshots. It didn't pass through Regards -- Łukasz --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] This e-mail and any attachments are for the intended recipient(s) only and may contain proprietary, confidential material. If you are not the intended recipient, (even if the email address above is yours) do not use, retain, copy or disclose any part of this communication or any attachment as it is strictly prohibited and may be unlawful. If you believe that you have received this e-mail in error, please notify the sender immediately and permanently delete. This email may be a personal communication from the sender and as such does not represent the views of the company. Thank you.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Struts 2.5 upgrade. 2/4/2020 - BCasey -->
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title>
Select an Employee
</title>
<link rel="stylesheet" type="text/css"
href="/taa/common/css/taa-global.css" />
<!-- 14.1.1 - Added the following hidden element to get rid of
cross site scripting issue. 12/01/2016 - JRL -->
<input type="hidden" name="rSuperPathList" value=""
id="rSuperPathList"/>
<!-- End of 14.1.1 - JRL -->
<script type="text/javascript">
var dblclickInd = false;
String.prototype.trim=function(){return
this.replace(/^\s+/,'').replace(/\s+$/,'');}
function clearWindow()
{
document.forms[0].innerHTML = "";
document.forms[1].innerHTML = "";
this.focus();
}
window.onload=function()
{
window.resizeTo(430,330);
try
{
initEmpIdList();
}
catch(e){}
try
{
if
((window.opener.makeMultiSubListSingleMode == undefined ) ||
window.opener.makeMultiSubListSingleMode)
{
document.getElementById("employeeId").multiple = false; //alert("LINE
256");
}
}
catch(e)
{
//alert("LINE 261 - catch"); // Gets
here.
}
document.forms[0].onsubmit=function()
{
try
{
if (!dblclickInd)
{
setEmpId(this);
if (manyEmployees &&
((window.opener.makeMultiSubListSingleMode == undefined) ||
window.opener.makeMultiSubListSingleMode))
{
document.getElementById("employeeId").multiple = false;
return false;
}
}
}
catch (e){}
window.onunload=function()
{
try
{ //v2010.01 - Robert Cruz -
20101110
if (!dblclickInd)
{ if
(window.opener.document.forms[0].elements["employeeId"].onchange)
{
window.opener.document.forms[0].elements["employeeId"].onchange(true);
}
if
(window.opener.document.forms[0].elements["employeeId"].value == "")
{
window.opener.document.forms[0].elements["employeeId"].focus();
window.opener.document.forms[0].elements["employeeId"].select();
}
else
{
if
(window.opener.putFocusOnFieldAfterEmpIdLink)
{
window.opener.putFocusOnFieldAfterEmpIdLink();
}
}
}
}
catch(e){}
return false;
}
}//document.forms[0].onsubmit=function()
document.forms[1].onreset=function()
{
var elms = this.elements;
for (var i=1;i<elms.length;i++)
{
var type = new
String(elms[i].getAttribute("type"));
if
(!type.toLowerCase().match("submit") && !type.toLowerCase().match("reset"))
{
elms[i].value = "";
}
}
return false;
}//document.forms[1].onreset=function()
this.focus();
var initCrumbs = new Array();
var rSuperPathList =
document.getElementById("rSuperPathList").value;
if (rSuperPathList != "")
{
rSuperPathList =
rSuperPathList.substring(0,rSuperPathList.lastIndexOf(","));
rSuperPathList = "\"" +
rSuperPathList.replace(/,/g,"\",\"") + "\"";
}
if (rSuperPathList.length > 1)
{
initCrumbs = rSuperPathList.split(",");
}
if (initCrumbs.length>0)
{
initDrillDown(initCrumbs);
selectFromWhatIsLeft();
}
if ( (window.opener.makeMultiSubListSingleMode
== undefined) || window.opener.makeMultiSubListSingleMode)
{
if
(document.getElementById("employeeId").multiple == true)
{
//setTimeout('setToSelectOne()',1000);
setToSelectOne();
}
}
else
{
if
(document.getElementById("employeeId").multiple == false)
{
//setTimeout('setToSelectMultiple()',1000);
setToSelectMultiple();
}
}
setTimeout("document.getElementById('theBody').style.display=''",0);
}// window.onload=function()
var manyEmployees;
var bCancel=false;
function setEmpId(f)
{
manyEmployees = false;
var empIdObj = f.elements["employeeId"];
var selArray = new Array();
var selEmpNameArray = new Array();
for (i=0; i<empIdObj.options.length; i++)
{
if (empIdObj.options[i].selected)
{
if (bCancel ||
empIdObj.options[i].text.toLowerCase().match("up one level") )
{
empIdObj.options[i].selected=false;
}
else
{
selArray.push(empIdObj.options[i].value);
var name = new
String(empIdObj.options[i].text.substring(2,empIdObj.options[i].text.lastIndexOf("-")
- 1));
selEmpNameArray.push(name.trim());
}
}
}
if (selArray.length>1)
{
if
(window.opener.makeMultiSubListSingleMode)
{
manyEmployees = true;
selEmpNameArray.length = 0;
for (i=0;
i<empIdObj.options.length; i++)
{
if
(empIdObj.options[i].selected)
{
empIdObj.options[i].selected = "";
}
}
return;
}
window.opener.document.forms[0].elements["employeeId"].maxLength=10;
window.opener.document.forms[0].elements["employeeId"].readOnly=true;
window.opener.document.forms[0].elements["employeeId"].className="readonly";
window.opener.document.forms[0].elements["employeeId"].value="*MULTIPLE*";
if
(window.opener.document.forms[0].elements["employeeName"])
{
window.opener.document.forms[0].elements["employeeName"].value="*MULTIPLE*";
}
}
else
{
window.opener.document.forms[0].elements["employeeId"].maxLength=6;
window.opener.document.forms[0].elements["employeeId"].readOnly=false;
window.opener.document.forms[0].elements["employeeId"].className="";
window.opener.document.forms[0].elements["employeeId"].value=selArray;
if
(window.opener.document.forms[0].elements["employeeName"])
{
window.opener.document.forms[0].elements["employeeName"].value=selEmpNameArray;
}
}
}//function setEmpId(f)
var empIdList=document.createElement("SELECT");
if ( (window.opener.makeMultiSubListSingleMode ==
undefined) || window.opener.makeMultiSubListSingleMode)
{
empIdList.removeAttribute("multiple");
empIdList.setAttribute("multiple",false);
}
else
{
empIdList.setAttribute("multiple",true);
}
var crumbs=new Array();
var empIdFields= new Array("employeeId");
var selOpts;
function initEmpIdList()
{
var which = "";
for (var i=0;empIdFields.length>i;i++)
{
if
(document.getElementById(empIdFields[i])&&(new
String(document.getElementById(empIdFields[i]).tagName)).match("SELECT"))
{
which = empIdFields[i];
}
}
if (which.length<1 ||
!document.getElementById(which) || document.getElementById(which).size==1)
{
return false;
}
var empId=document.getElementById(which);
selOpts= new String(" ");
var
optGroups=empId.getElementsByTagName("OPTGROUP");
while (0<optGroups.length)
{
var options=new Array();
var
tempOpts=optGroups[0].getElementsByTagName("OPTION");
for (i=0;i<tempOpts.length;i++)
{
options[i]=tempOpts[i].cloneNode(true);
options[i].selected=tempOpts[i].selected;
if (options[i].selected)
{
selOpts+=options[i].value+" ";
}
}
while (optGroups[0].hasChildNodes())
{
optGroups[0].removeChild(optGroups[0].firstChild);
}
for (i=0;i<options.length;i++)
{
optGroups[0].appendChild(options[i]);
}
if (empIdList.length==0)
{
crumbs.push(optGroups[0].id);
}
empIdList.appendChild(optGroups[0]);
}
empId.appendChild(empIdList.firstChild.cloneNode(true));
var
newOpts=empId.getElementsByTagName("OPTION");
for (var i=0;i<newOpts.length;i++)
{
if (selOpts.indexOf(newOpts[i].value) >
-1)
{
newOpts[i].selected=true;
}
}
empId.ondblclick=function()
{
dblclickInd = true;
var
empId=document.getElementById(which);
var title="";
if (empId.selectedIndex>=0)
{
title=empId.options[empId.selectedIndex].title;
}
if (title.trim() == "")
{
dblclickInd = false;
return;
}
drillDown(this.value,which);
}
empId.onkeyup=function(event)
{
var
key=(window.event)?window.event.keyCode:event.which;
if(key==32)
// Key of 32 = space
{
drillDown(this.value,which);
}
else
{
scanList(key);
}
}
}// function initEmpIdList()
function initDrillDown(initCrumbs)
{
try
{
var
empIdInit=document.getElementById(empIdFields[0]);
crumbs = initCrumbs;
while (empIdInit.hasChildNodes())
{
empIdInit.removeChild(empIdInit.firstChild);
}
if (crumbs.length>1)
{
var
upLevelInit=document.createElement("OPTION");
upLevelInit.value=crumbs[crumbs.length-1];
upLevelInit.title="Up One
Level";
upLevelInit.text="Up One Level";
upLevelInit.innerText="Up One
Level";
empIdInit.appendChild(upLevelInit);
}
var
optGroupsInit=empIdList.getElementsByTagName("OPTGROUP");
var newGroupInit;
newGroupInit=optGroupsInit[0].cloneNode(true);
empIdInit.appendChild(newGroupInit);
}
catch(e){}
}//function initDrillDown(initCrumbs)
// Is this a dead function? See the identical function
immediatley below. 14.1.1
//*********************************************************************************************************************
// COMMENT-OUT THIS FUNCTION DURING TESTING and see if
it matters... BJC 14.1.1 11/18/2016
//*********************************************************************************************************************
function drillDown(id,empIdField)
{
try
{
if
(!document.getElementById(empIdField))
{
return false;
}
var
empId=document.getElementById(empIdField);
var title="";
if (empId.selectedIndex>=0)
{
title=empId.options[empId.selectedIndex].title;
}
if (title.length<1)
{
return null;
}
if (title.toLowerCase().match("up"))
{
crumbs.pop();
id=crumbs[crumbs.length-1];
}
else
{
crumbs.push(id);
}
while (empId.hasChildNodes())
{
empId.removeChild(empId.firstChild);
}
if (crumbs.length>1)
{
var
upLevel=document.createElement("OPTION");
upLevel.value=crumbs[crumbs.length-1];
upLevel.title="Up One Level";
upLevel.text="Up One Level";
upLevel.innerText="Up One
Level";
empId.appendChild(upLevel);
}
var
optGroups=empIdList.getElementsByTagName("OPTGROUP");
var newGroup;
for (i=0;i<optGroups.length;i++)
{
if (optGroups[i].id==id)
{
newGroup=optGroups[i].cloneNode(true);
}
}
empId.appendChild(newGroup);
}
catch(e){}
}
function drillDown(id,empIdField)
{
try
{
if
(!document.getElementById(empIdField))
{
return false;
}
var
empId=document.getElementById(empIdField);
var title="";
if (empId.selectedIndex>=0)
{
title=empId.options[empId.selectedIndex].title;
}
if (title.length<1)
{
return null;
}
if (title.toLowerCase().match("up"))
{
document.getElementById("upOneLevel").click();
}
else
{
document.getElementById("rsuperIDToGetLevelFor").value = id;
document.getElementById("downOneLevel").click();
}
}catch(e){}
}
function selectFromWhatIsLeft()
{
var manyEmployeesCount = 0;
var inputs;
try
{
inputs=document.getElementById("employeeId").options;
for(var i=0;i<inputs.length;i++)
{
try
{
var isValue =
new String(inputs[i].value);
var isSelected
= ((selOpts.indexOf(isValue) != -1)? true : false);
if (isSelected)
{
manyEmployeesCount++;
inputs[i].selected = true;
}
}catch(e){}
}
}catch(e){}
if ((manyEmployeesCount > 1) && (
(window.opener.makeMultiSubListSingleMode == undefined) ||
window.opener.makeMultiSubListSingleMode))
{
for (var i=0;i<inputs.length;i++)
{
if(inputs[i].selected)
{
inputs[i].selected=false;
}
}
}
else
{
setTimeout('scroll()',1000);
}
}
function checkForMultipleSelections()
{
var manyEmployeesCount = 0;
var inputs;
try
{
inputs=document.getElementById("employeeId").options;
for(var i=0;i<inputs.length;i++)
{
if (inputs[i].selected &&
(inputs[i].selected == true))
{
manyEmployeesCount++;
}
}
}catch(e){}
// clear all options
if (manyEmployeesCount > 1)
{
for(var i=0;i<inputs.length;i++)
{
if (inputs[i].selected &&
(inputs[i].selected == true))
{
inputs[i].selected = "";
}
}
}
}
function setToSelectOne()
{
document.getElementById("employeeId").multiple=false;
document.getElementById("employeeId").onchange
= checkForMultipleSelections;
}
function setToSelectMultiple()
{
document.getElementById("employeeId").multiple=true;
}
function scroll()
{
try
{
var
opt=document.getElementById("employeeId").options;
for (var i=0;i<opt.length;i++)
{
if(opt[i].selected)
{
opt[i].selected=true;
return;
}
}
}catch(e){}
}
var search=new String("");
function scanList(keyCode)
{
var key = String.fromCharCode(keyCode);
var reg=/[\w\d]/;
if (reg.test(key) && keyCode != 13)
{
search+=key;
var list =
document.getElementsByTagName("SELECT")[0];
var found = false;
var repeat = false;
for (var i=0; i < list.options.length;
i++)
{
var label = new
String(list.options[i].text);
while
(!reg.test(label.charAt(0)))
{
label =
label.substring(1);
}
if
(label.substring(0,search.length) == search && !found)
{
manyEmployeesCount++;
list.options[i].selected = "selected";
found = true;
}
else
{
list.options[i].selected = "";
}
if (i == list.options.length-1
&& !found && !repeat)
{
search = key;
i=0;
repeat=true;
}
}
}
else if (keyCode == 13)
{
setEmpId(document.forms[0]);
}
else
{
search = "";
}
}
// This function gets called when the cancel button
gets clicked. Adding this function for release 14.1.1
function cancelButtonClicked()
{
bCancel = true;
}
</script>
</head>
<body id="theBody" style="display:none;">
<div class="center">
<form id="SubordinateListLevel2"
name="SubordinateListLevel2" action="/taa/SubordinateListLevel2" method="post">
<fieldset>
<legend>Select an
Employee</legend>
<div class="left">
<label
for="employeeIds"></label>
<input type="submit"
value="Up One Level" id="upOneLevel" name="submit" tabindex="1"/>
<select
name="employeeId" id="employeeId" size="8" tabindex="1">
<optgroup id="BK0020"
label="BK0020">
<option value="BK0160" >
21 TESTING -
BK0160
</option>
<option value="AF0001"
title="Show Subordinates">
+ A -
AF0001
</option>
<option value="BK0300" >
CONTACTED EDUCATOR -
BK0300
</option>
<option value="BK0270" >
FOREIGN NATL -
BK0270
</option>
<option value="BK0090" >
INTERMITTENT FT -
BK0090
</option>
<option value="BK0080" >
LABOR REL TEMP B -
BK0080
</option>
<option value="BK0390" >
PART TIME PD TEMPA -
BK0390
</option>
<option value="BK0260" >
PHYSICIAN MILOFFICR -
BK0260
</option>
<option value="BK0020" >
SUPVR2ND GS -
BK0020
</option>
</optgroup>
</select>
</div>
<div class="right smallcolumn
center">
<span
id="downOneLevelDiv" style="display:none; position:absolute">
<input
type="hidden" name="rsuperIDToGetLevelFor" value=""
id="rsuperIDToGetLevelFor"/>
<input
type="submit" value="Down One Level" id="downOneLevel" name="submit"
tabindex="6"/>
</span>
<br/><br/>
<input type="submit"
value="Submit" id="submit" name="submit" tabindex="6"/>
<br/><br/>
<input type="submit"
value="Cancel" id="cancel" name="submit" tabindex="7"
onclick="cancelButtonClicked()"/>
</div>
</fieldset>
</form>
<form id="FilterSubordinateEmployeeListLevel2"
name="FilterSubordinateEmployeeListLevel2"
action="/taa/FilterSubordinateEmployeeListLevel2" method="post">
<fieldset>
<legend>Optional - Filter
Employee List By:</legend>
<div class="left em7">
<label
for="supervisor">Supervisor ID</label>
<input
type="text" name="supervisor" size="8" maxlength="6" value="" tabindex="2"
id="supervisor"/>
<br />
<label
for="rcc">RCC</label>
<input
type="text" name="rcc" size="8" maxlength="5" value="" tabindex="3" id="rcc"/>
<br />
<label
for="shift">Shift</label>
<select name="shift"
id="shift" size="1" tabindex="4" >
<option
value=""> </option>
<option
value="1">1</option>
<option
value="2">2</option>
<option
value="3">3</option>
</select>
</div>
<div class="right smallcolumn
center">
<input type="submit"
value=" Filter " id="FilterSubordinateEmployeeListLevel2_submit" name="submit"
tabindex="5"/>
<br /><br />
<input type="submit"
value=" Clear " id="FilterSubordinateEmployeeListLevel2_submit" name="submit"
tabindex="6"/>
</div>
</fieldset>
</form>
</div>
<script type="text/javascript">
document.getElementById("upOneLevel").style.display =
"none";
document.getElementById("downOneLevelDiv").style.display = "none";
</script>
</body>
</html>--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

