Dave Newton wrote:
On Fri, 2003-11-14 at 14:46, Yoel Spotts wrote:
I thought of that as well that the content of the template might have caused the Exception but really the template does very little -- just rendering some stuff which was placed in the context. Does not seem likely. I also should have mentioned we are using velocity within an iplanet web server.
Really, what's in it though?
Sorry, I should have posted it to begin with. The following parameters are passed into the context:
1) $doDUR -- a simple Boolean value
2) $allRoles -- a String array
3) $applicants -- an array of HashMaps. Each HashMap contains pairs of String to String mappings. There is one mapping called mri in the template which is a simple class which contains several String fields.
I hope this helps. If there is any other information which may be helpful, please let me know!
Thanks,
Yoel
user_appl.vm ==============
<center>
<H3>Applicant List</H3>
<script language=JavaScript>
function checkIt (theForm)
{
var checked = false;
var els = theForm.elements;
var i;
for (i = 0; i < theForm.length; i++) {
if (theForm.elements[i].type == "checkbox") {
if (theForm.elements[i].checked) {
checked = true;
break;;
}
}
}
if (!checked) {
alert ("Please select an user first");
return false;
}
return true;
}
</script>
<FORM METHOD="POST" ACTION="$req.RequestURI" onSubmit="return checkIt(this) && disableSubmit(this);" >
#if ($doDUR)
<TABLE COLS=10 CELLPADDING=0 CELLSPACING=4 BORDER=0
style="background-color: rgb(155,186,214);" width="96%">
#else
<TABLE COLS=8 CELLPADDING=0 CELLSPACING=4 BORDER=0
style="background-color: rgb(155,186,214);" width="96%">
#end
<TR align=left>
<TH nowrap>Applicant Name</TH>
<TH>Account Name</TH>
#if ($doDUR)
<TH>Requested Roles</TH>
<TH>Approved Roles</TH>
<TH>Email Address</TH>
<TH>Access Code</TH>
#else
<TH>Approved Roles</TH>
<TH>Email Address</TH>
#end
<TH>Duty Phone</TH>
<TH>Home Phone</TH>
<TH>Pager</TH>
<TH>Reason</TH>
</TR>
#foreach ($user in $applicants)
<TR>
#if ($doDUR)
<td colspan=10 bgcolor="#ffffff" height=2><img src="images/shim.gif"></td>
#else
<td colspan=8 bgcolor="#ffffff" height=2><img src="images/shim.gif"></td>
#end
</TR>
<TR align=left>
<TD nowrap>
<INPUT TYPE="checkbox" NAME=sel_$user.Name VALUE="yes"/> $!user.FullName
</TD>
<INPUT TYPE="hidden" NAME="name_$user.Name" VALUE="$!user.FullName"/>
<INPUT TYPE="hidden" NAME="currole_$user.Name" VALUE="$!user.Role"/>
<INPUT TYPE="hidden" NAME="email_$user.Name" VALUE="$!user.Email"/>
<TD nowrap>
$!user.Name
</TD>
#if ($doDUR)
<TD>
#foreach ($role in $user.mri.RequestedRoles)
$role <BR>
#end
</TD>
<TD>
<SELECT NAME="selrole_$user.Name" MULTIPLE size=5>
#foreach ($role in $allRoles)
<OPTION VALUE="$role">$role
#end
</SELECT>
</TD>
<TD> $!user.Email</TD>
<TD> $!user.accesscode</TD>
#else
<TD>
<SELECT NAME="selrole_$user.Name" MULTIPLE size=5>
#foreach ($role in $allRoles)
<OPTION VALUE="$role">$role
#end
</SELECT>
</TD>
<TD> $!user.Email</TD>
#end
<TD> $!user.mri.DutyPhone</TD>
<TD> $!user.mri.HomePhone</TD>
<TD> $!user.mri.Pager</TD>
<TD><INPUT TYPE="text" SIZE=20" NAME="reason_$user.Name"></TD>
</TR>
#end
</TABLE> <p align="center"> <INPUT TYPE="submit" name="Action" VALUE="Accredit Applicants">   <INPUT TYPE="submit" name="Action" VALUE="Delete Applicants">   </p> </FORM> </center>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]