<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/enrgise-html.tld" prefix="enrgise" %>

<html:html>
<head>
  <html:base />
  <TITLE><bean:message  key="hrm.title" /></TITLE>
  <jsp:include page="GenIncludes.jsp" flush="true" />
  <meta http-equiv=pragma content=no-cache>
</head>

<BODY scroll="auto" onkeydown="hotKeys(event);">

<html:form name="HrmAprslForm" action="HrmEmpAprslDtlsBaseAction" type="wenrgise.hrms.webtier.form.HrmAprslForm">
<bean:define id="ParentForm" name="HrmAprslForm" toScope="request" />
<jsp:include page="GenIconMenu.jsp" flush="true" />


<!--Top Most Blue Bar-->
<TABLE cellSpacing=0 bgColor=#bdd0ef>
    <tr>
        <TD  colSpan=12 class=mainHeader height=10><bean:message key="hrm.EmpAprsl.heading" /></TD>
    </TR>
</TABLE>
<!--//  Display Errors -->
<enrgise:errors/>
<logic:messagesPresent message="true">
<Table>
    <html:messages id="message" message="true">
    <TR><TD>
      <bean:write name="message"/>
    </TD></TR>
    </html:messages>      
</Table>
</logic:messagesPresent>
<!--//  Display Errors --> 

<TABLE cellSpacing=0 cellPadding=0 border=0 >
    <TR>
        <TD>
        
        <TABLE cellSpacing=0 cellPadding=0 >
        <!--Master Information Starts -->
        
         <TR>
            <TD colspan=6 bgColor=#4682b4><IMG height=1 src="../includes/images/pixel.gif" width=1 border=0></TD>
         </TR>
         <tr>
            <td class=labelText><bean:message key="hrm.EmpAprsl.empCode" /></td>
            <td><html:text  property="empNo"  maxlength="15" size="26" styleClass="optional" readonly="false"  /><enrgise:img height="16" name="HrmAprslForm" align="center" src="../includes/images/lov.jpg" property="butEmpNo" onclick="return ShowEmployeeNo();"   /></td>
            
            <td class=labelText><bean:message key="hrm.EmpAprsl.empName" /></td>
            <td><html:text  property="empName"  maxlength="15" size="26" styleClass="locked" readonly="false" /></td>
          <!--
            <td class=labelText><bean:message key="hrm.EmpAprsl.aprslYear" /></td>
            <td><html:text  property="aprslYear"  maxlength="15" size="26" styleClass="optional" readonly="false" /></td>
            -->
          </tr>
          </table>  
  
      <table cellspacing=0 cellpadding=0 border=0>
      <!-- Detail Information Row starts -->
      <TR>
       <TD colSpan=6>
              <TABLE cellSpacing=0 cellPadding=0 border=0>
                <TBODY>
                 <TR>
                  <TD >
                  <DIV id=divDtlTable style="height:250px">
                    <TABLE  border="0" cellSpacing=0 cellPadding=0>
                     <TBODY>
                        <tr>
                          <TD class=tableHeader width="1%"><input type="checkbox" name="selectAll"  onclick="toggleCheckBox('checked')"  /></td>
                          <td class=tableHeader><bean:message key="hrm.EmpAprsl.empCode" /></td>
                          <td class=tableHeader><bean:message key="hrm.EmpAprsl.empName" /></td>
                          <td class=tableHeader><bean:message key="hrm.EmpAprsl.aprslYear" /></td>
                          <TD class=tableHeader><bean:message  key="hrm.EmpAprsl.finalRating" /></td>
            
                       </tr> 
                       
                            <logic:iterate id="HrmAprsl" name="HrmAprslForm" property="arrHrmEmpAprslDtl" type="wenrgise.hrms.bean.HrmAprslEmployeeBean"  indexId="idx"  >
                               <logic:notEqual name="HrmAprsl" property="status" value="D" >
                                 <tr>
                                     <td><html:checkbox property="checked" name="HrmAprslForm" alt="<%=idx.toString()%>" onclick="boxClicked(this.alt); " />    
                                     <html:hidden property="itemChecked" name="HrmAprsl" /><html:hidden property="status" name="HrmAprsl" /><html:hidden property="detailId"  name="HrmAprsl" /></td>            
                                     <html:hidden property="empIdDtl" name="HrmAprsl" />
                                     <td ><enrgise:text property="empNoDtl" name="HrmAprsl" styleClass="required" disabledClass="locked" maxlength="15" style="width:90%" titleKey="hrm.EmpAprsl.empCode" alt="P" onkeypress="isInteger(event);"  onchange='<%="doChangeDetail("+idx.toString()+")"%>' />
                                          <enrgise:img height="16" name="HrmAprslForm" align="center"  src="../includes/images/lov.jpg" property="butEmpNoDtl" alt="<%=idx.toString()%>" onclick="return ShowEmpNoDtl(this.alt);"   /></td>
                                     <td ><enrgise:text property="empNameDtl" name="HrmAprsl" styleClass="locked" disabledClass="locked" maxlength="4" style="width:100%" titleKey="hrm.EmpAprsl.empName" alt="P" onkeypress="isInteger(event);"  onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                                     <td ><enrgise:text property="aprslYearDtl" name="HrmAprsl" styleClass="required" disabledClass="locked" maxlength="4" style="width:100%" titleKey="hrm.EmpAprsl.aprslYear" alt="P" onkeypress="isInteger(event);"  onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                                     <TD ><html:select property="finalRatingDtl" name="HrmAprsl" style="width:100%" styleClass="required" onchange='<%="doChangeDetail("+idx.toString()+")"%>' >
                                           <html:option value="" ><bean:message   key="hrm.pleaseSelect" /></html:option>
                                           <html:option value="Outstanding" ><bean:message   key="hrm.EmpAprsl.Outstanding" /></html:option>
                                           <html:option value="Very Good" ><bean:message   key="hrm.EmpAprsl.VeryGood" /></html:option>
                                           <html:option value="Good" ><bean:message   key="hrm.EmpAprsl.Good" /></html:option>
                                           <html:option value="Average" ><bean:message   key="hrm.EmpAprsl.Average" /></html:option>
                                          </html:select>
                                      </td>
                                </tr>
                              </logic:notEqual>
                              <logic:equal name="HrmAprsl" property="status" value="D"  >
                                   <tr>
                                     <td width="1%"><html:checkbox property="checked" value="check" disabled="true" alt="<%=idx.toString()%>" onclick="boxClicked(this.alt);"  />
                                     <html:hidden property="itemChecked" name="HrmAprsl" /><html:hidden property="status" name="HrmAprsl" /><html:hidden property="detailId"  name="HrmAprsl" /></td>            
                                     <html:hidden property="empIdDtl" name="HrmAprsl" />
                                     <td ><enrgise:text  property="empNoDtl" name="HrmAprsl"  size="6" styleClass="deletedRow" disabledClass="locked"  style="width:100%"  alt="<%=idx.toString()%>"   onkeypress="isInteger(event);" onchange="doChangeDetail(this.alt);" /></td>
                                     <td ><enrgise:text  property="aprslYearDtl" name="HrmAprsl"  size="6" styleClass="deletedRow" disabledClass="locked"  style="width:100%"  alt="<%=idx.toString()%>"   onkeypress="isInteger(event);" onchange="doChangeDetail(this.alt);" /></td>
                                     <TD ><html:select property="finalRatingDtl" name="HrmAprsl" styleClass="required" onchange='<%="doChangeDetail("+idx.toString()+")"%>' >
                                           <html:option value="" ><bean:message   key="hrm.pleaseSelect" /></html:option>
                                           <html:option value="Outstanding" ><bean:message   key="hrm.EmpAprsl.Outstanding" /></html:option>
                                           <html:option value="Very Good" ><bean:message   key="hrm.EmpAprsl.VeryGood" /></html:option>
                                           <html:option value="Good" ><bean:message   key="hrm.EmpAprsl.Good" /></html:option>
                                           <html:option value="Average" ><bean:message   key="hrm.EmpAprsl.Average" /></html:option>
                                          </html:select>
                                      </td>
                                  </tr>
                              </logic:equal>
                              </logic:iterate>                        
                        
                      </TBODY>
                      </TABLE>
                      </DIV>
                      </TD>
                    </TR>
               <tr>
                <td>	
               <jsp:include page="GenDetailMenu.jsp" flush="true" />
		            </TD>
		            <td> </td>
               </tr>
        </TABLE>
      </td>
     </tr>
      <TR>
        <TD background="../includes/images/line_r.gif"><IMG src="../includes/images/pixel.gif" border=0></TD>
      </TR>
      
  </TABLE>
</td>
              </TR>                     
  
              <!-- Get details starts -->
                          </TD>
                      </tr>
                      
                    </tbody>
                   </TABLE>
             
                  </TBODY>
                </TABLE>
              </td>
            </tr>



        </TABLE>
     </td>
	 </tr>
 
    <!-- Bottom Blue Bar -->
       <TR>
            <td>
              <TABLE  cellspacing="0" cellpadding="0" border=0>
                    <tr height="20">
                        <td width=45% align=center bgColor=#4682b4></td>
                        <td  bgColor=#4682b4></td>
                        <td bgColor=#4682b4></td>
                        <td align=right bgColor=#4682b4><img src="../includes/images/man.jpg"></td>
                        
                   </TR>
                </table>
            </td>
          </tr>
    
  <!-- Container Table Ending Columns Starts-->
  </TD>
    
</TR>
</TBODY>
</TABLE>

<!-- Container Table Ends -->
<!-- Common Hidden Variables-->
<html:hidden name="HrmAprslForm" property="screenName" value="HrmAprslEmployee" />
<html:hidden name="HrmAprslForm" property="forwardedPage" />
<html:hidden name="HrmAprslForm" property="positionRequested" />
<html:hidden name="HrmAprslForm" property="screenMode" />

<html:hidden property="txtIndex" name="HrmAprslForm"  />
<html:hidden property="userPageRequested" name="HrmAprslForm" />
<html:hidden property="userPositionRequested"  name="HrmAprslForm" />
<html:hidden property="pageRequested"  name="HrmAprslForm" />

<html:hidden property="lovKey" name="HrmAprslForm"  />
<html:hidden property="txtSearchFields" name="HrmAprslForm"  />
<html:hidden property="txtDisplayFields" name="HrmAprslForm"  />
<html:hidden property="headerPrimaryKey" name="HrmAprslForm" />
<html:hidden property="headerDataChanged" name="HrmAprslForm" value="false"/>
<html:hidden property="detailDataChanged" name="HrmAprslForm" />
<input type="hidden" name="multipleFlag" >
<input type="hidden" name="queryParam" >
<html:hidden property="employeeId" name="HrmAprslForm" />
<html:hidden property="empIdDtl" name="HrmAprslForm" />
<html:hidden property="firstLoad" name="HrmAprslForm" />


<!-- Screen Specific variables -->

<!-- Hidden fields end -->

</html:form>
</body>
</html:html>

<script language="javascript">

function doChangeHeader()
{
 document.forms[0].headerDataChanged.value="true";
}

function doQueryMode()
{
 
  return "HrmAprslEmployeeQueryModeAction.do";
}


function doInsertMode()
{

  return "HrmAprslEmployeeNewModeAction.do";
}

 function doOnLoad()
{
  if(document.forms[0].firstLoad.value!="false")
  {
    return  "HrmAprslEmployeeOnLoadAction.do"; 
  }
}

function doExecute()
{
   return "HrmAprslEmployeeGetHeaderAction.do";
}

function doSave()
{
  return "HrmAprslEmployeeSaveAction.do";
  
}

function doDelete()
{

  return "HrmAprslEmployeeDeleteAction.do";
  
}

function doRefresh()
{

  return "HrmAprslEmployeeRefreshAction.do";
  
}

function doPrevHeader()
{
  return "HrmAprslEmployeeGetNextHeaderAction.do"; 
}
function doExit()
{
  return "HrmAprslEmployeeExitAction.do"; 
}
function doNextHeader()
{
  return "HrmAprslEmployeeGetNextHeaderAction.do"; 
}

function doJumpHeader()
{
  return "HrmAprslEmployeeFirstGetNextHeaderAction.do"; 
}

function doGetDetail()
{
  return "HrmAprslEmployeeGetDetailAction.do";
}

function doAddRow()
{
  document.forms[0].screenMode.value="U";
  return "HrmAprslEmployeeAddRowAction.do";
}

function doDelRow()
{
 return "HrmAprslEmployeeDeleteRowAction.do";  
}


function doPrevDetail()
{

  return "HrmAprslEmployeeGetDetailPageAction.do";  
}

function doNextDetail()
{

  return "HrmAprslEmployeeGetDetailPageAction.do";
}

function doJumpDetail()
{
  return  "HrmAprslEmployeeGetDetailPageAction.do"; 
}

function ShowEmployeeNo()
{       //alert('1');
        //document.forms[0].queryParam.value ="employeeId="+ document.forms[0].empId.value ;
        document.forms[0].lovKey.value= "AprslEmpNoHrmAprslEmployeeQ";
        document.forms[0].txtSearchFields.value = "hrm.EmpAprsl.empCode,hrm.EmpAprsl.empName";
        document.forms[0].txtDisplayFields.value = "employeeId,empNo,empName";
        document.forms[0].multipleFlag.value = "false";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAprslForm');
        return true;
        
}

function ShowEmpNoDtl(i)
{       //alert('1');
        document.forms[0].lovKey.value= "AprslEmpNoHrmAprslEmployeeQ";
        document.forms[0].txtSearchFields.value = "hrm.EmpAprsl.empCode,hrm.EmpAprsl.empName";
        document.forms[0].txtDisplayFields.value = "empIdDtl,empNoDtl,empNameDtl";
        document.forms[0].multipleFlag.value = "false";
        HrmAprslForm.txtIndex.value=i;
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAprslForm');
        return true;
        
}

</script>