<%@ 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="WFL.title" /></TITLE>
    <jsp:include page="GenIncludes.jsp" flush="true" />
		
</head>

<BODY onkeydown="hotKeys(event);" onload="doBaseOnLoad();"  scroll=no>

<html:form name="WFLDtlDocTypeForm" action="WFLDtlDocTypeBaseAction"  type="wenrgise.workflow.webtier.form.WFLDtlDocTypeForm">
<bean:define id="ParentForm" name="WFLDtlDocTypeForm" toScope="request" />
<bean:define id="pageNo" name="WFLDtlDocTypeForm" property="pageRequested"  />
<bean:define id="maxPage" name="WFLDtlDocTypeForm" property="totalPageCount"  />
<jsp:include page="GenIconMenu.jsp" flush="true" />
<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>
<table>
<!--Top Most Blue Bar-->
<TABLE cellSpacing=0 bgColor=#bdd0ef>
    <tr>
        <TD  colSpan=12 class=mainHeader height=10><bean:message key="WFL.WFLDtlDocType.heading" /></TD>
    </TR>
</TABLE>

<TABLE cellSpacing=0 cellPadding=0 border=0 >
    <TR>
        <TD>
        
        <TABLE cellSpacing=0 cellPadding=0 >
        <!--Order Information Starts -->
             <TR>
                  <TD class=subHeader colspan=6><bean:message key="WFL.WFLDtlDocType.header" /></TD>
             </TR>
             
             <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="WFL.WFLDtlDocType.docCode" /></td>
                  <td colspan="3"><enrgise:text name="WFLDtlDocTypeForm"  property="documentCode" alt="A" titleKey="WFL.WFLDtlDocType.docCode" maxlength="60" size="23" styleClass="required" disabledClass="locked"  /><enrgise:img name="WFLDtlDocTypeForm" height="16" align="center" src="../includes/images/lov.jpg" styleClass="icon" property="butDocCode"   onclick="return ShowCode()" />
                                  <enrgise:text name="WFLDtlDocTypeForm"  property="documentDesc" alt="P" titleKey="WFL.WFLDtlDocType.docDesc" maxlength="255" size="68" styleClass="optional" disabledClass="locked"   />
                  <td colspan=2></td>
             </tr> 
             
                  <td height="10"></td>
             </tr>
     </table>
     
     
  <table cellspacing=0 cellpadding=0 border=0>
    <!-- Detail Information Row starts -->
 	 <TR>
       <TD colspan=3>
        <!-- Personal Details Table Starts -->
         <TABLE cellSpacing=0 cellPadding=0 >
           <tr>
                <TD width=5 bgColor=#4682b4><IMG height=1 src="../includes/images/pixel.gif" width=5 border=0></TD>
                <TD class=actTabText noWrap bgColor=#4682b4 ><bean:message key="WFL.WFLDtlDocType.docDetails" /><IMG height=1 src="../includes/images/pixel.gif" width=10 border=0></TD>
                <TD><IMG height=19  src="../includes/images/formtab_r.gif" width=10  border=0></TD>                           
                <td background="../includes/images/line_t.gif" width="100%">&nbsp;</td>
                <td background="../includes/images/line_t.gif"><img src="../includes/images/pixel.gif" width="10" height="1" border="0"></td>
          </tr>                  
          <TR >
          
 <!-- Detail table Container starts -->
              <TD colspan=5>
                <TABLE cellSpacing=0 cellPadding=0 border=0>
                  <TBODY>
                   <TR>
                     <TD >
                       <DIV id=divDtlTable style="height:220px" >
  			<!-- Detail table starts -->
                       <TABLE  border="0" cellSpacing=0 cellPadding=0 id="tableName" >
                         <TBODY>
                          <tr>
                              <TD class=tableHeader width="1%"><input type=checkbox></TD>
                              <td class="tableHeader" width="15%"><bean:message key="WFL.WFLDtlDocType.dtlDocCode" /></td>
                              <td class="tableHeader" width="30%"><bean:message key="WFL.WFLDtlDocType.dtlDocDesc" /></td>
                              <TD class="tableHeader" width="20%"><bean:message key="WFL.WFLDtlDocType.conditionDesc" /></td>
                              <TD class="tableHeader" width="25%"><bean:message key="WFL.WFLDtlDocType.exp" /></td>
                              <td class="tableHeader" width="5%"><bean:message key="WFL.WFLDtlDocType.priority" /> </td> 
                           
                                              
                         </tr>                 
            <!--Insert Logic Iterate Here-->       
                        <logic:iterate id="WFLDtlDocType" name="WFLDtlDocTypeForm" property="arylstDtlDocType" type="wenrgise.workflow.bean.WflDtlDocTypeDtlBean" indexId="idx" >
                          <logic:notEqual name="WFLDtlDocType" property="status" value="D" >         
                         <tr>
                              <TD class=tableText width="1%"> <enrgise:checkbox property="checked" name="WFLDtlDocTypeForm" disabledClass="locked" onclick='<%="boxClicked("+idx.toString()+")"%>' />
                               <html:hidden property="status"  name="WFLDtlDocType" />
                               <html:hidden property="detailId"  name="WFLDtlDocType" />
                               <html:hidden property="itemChecked"  name="WFLDtlDocType" />
                               <html:hidden property="txtConditionId"  name="WFLDtlDocType" /></td>
                              <TD class=tableText ><enrgise:text  name="WFLDtlDocType" property="txtDtlDocCode" styleClass="required" disabledClass="required" size="35" alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>  
                              <TD class=tableText ><enrgise:text  name="WFLDtlDocType" property="txtDtlDocDesc" styleClass="required" disabledClass="required" size="45" alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>  
                              <TD class=tableText ><html:text  name="WFLDtlDocType" property="txtConDesc" readonly="true" styleClass="required" size="20" alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /><enrgise:img name="WFLDtlDocType" height="16" align="center" src="../includes/images/lov.jpg" styleClass="icon" property="butCondDesc"   onclick='<%="ShowCondDesc("+idx.toString()+")"%>' /></td>  
                              <TD class=tableText ><html:text  name="WFLDtlDocType" property="txtExp" readonly="true" styleClass="required" size="30" alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>                        
                              <TD class=tableText ><enrgise:text  name="WFLDtlDocType" property="txtPriority" styleClass="optional" disabledClass="locked" size="5" alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>    
                         </tr> 
                          </logic:notEqual>
                           <logic:equal name="WFLDtlDocType" property="status" value="D" >         
                           <tr>
                                <TD class=tableText width="1%"> <html:checkbox property="checked" disabled="true" name="WFLDtlDocTypeForm"  onclick='<%="boxClicked("+idx.toString()+")"%>' />
                                 <html:hidden property="status"  name="WFLDtlDocType" />
                                 <html:hidden property="detailId"  name="WFLDtlDocType" />
                                 <html:hidden property="itemChecked"  name="WFLDtlDocType" />
                                 <html:hidden property="txtConditionId"  name="WFLDtlDocType" /></td>
                                <TD class=tableText ><html:text  name="WFLDtlDocType" property="txtDtlDocCode" styleClass="deletedRow" readonly="true" size="35" alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>  
                                <TD class=tableText ><html:text  name="WFLDtlDocType" property="txtDtlDocDesc" styleClass="deletedRow" readonly="true" size="45" alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>  
                                <TD class=tableText ><html:text  name="WFLDtlDocType" property="txtConDesc" styleClass="deletedRow" readonly="true" size="20" alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /><img name="WFLDtlDocType" height="16" align="center" src="../includes/images/lov_dis.jpg" styleClass="icon" property="butCondDesc"   /></td>  
                                <TD class=tableText ><html:text  name="WFLDtlDocType" property="txtExp" styleClass="deletedRow" readonly="true" size="30" alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>                        
                                <TD class=tableText ><html:text  name="WFLDtlDocType" property="txtPriority" styleClass="deletedRow" readonly="true"  size="5" alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>    
                           </tr> 
                          </logic:equal>
                        </logic:iterate>
                    </logic:notEmpty>          
                                                              
                     </TBODY>
                    </TABLE>
                  </DIV>
                </TD>
              </TR>                     
  
  <!-- Get details starts -->
                        <tr></tr>
                          <td colspan=11>	
                              <jsp:include page="GenDetailMenu.jsp" />
                          </TD>
                      </tr>
                  </TBODY>
                </TABLE>
              </td>
            </tr>



        </TABLE>
     </td>
	 </tr>
                <!-- Tab Table Ends -->

<!-- Bottom Blue Bar -->
       <TR>
            <td>
              <TABLE  cellspacing="0" cellpadding="0" border=0>
                    <tr height="20">
                        <td colspan="5" 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 -->
<html:hidden  property="screenName" value="WflDtlDocType" />
<html:hidden  property="forwardedPage" />
<html:hidden  property="positionRequested"  />
<html:hidden  property="screenMode" />
<html:hidden property="headerPrimaryKey" name="WFLDtlDocTypeForm"   />
<html:hidden property="headerDataChanged" name="WFLDtlDocTypeForm"   />
<html:hidden property="detailDataChanged" name="WFLDtlDocTypeForm"   />
<html:hidden property="userPageRequested" />
<html:hidden property="userPositionRequested"  />
<html:hidden property="pageRequested" />
<!-- These four hidden fields must be present in pages where there is a detail part -->
<html:hidden property="firstLoad" name="WFLDtlDocTypeForm" />
<html:hidden property="docId" name="WFLDtlDocTypeForm"  />
<html:hidden property="queryParam" name="WFLDtlDocTypeForm"  />
<!-- Hidden Header LOV  -->


<html:hidden property="lovKey" name="WFLDtlDocTypeForm"  />
<html:hidden property="txtSearchFields" name="WFLDtlDocTypeForm"  />
<html:hidden property="txtDisplayFields" name="WFLDtlDocTypeForm"  />
<html:hidden property="txtIndex" name="WFLDtlDocTypeForm"  />



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

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

function doQueryMode()
{

  return "WFLDtlDocTypeQueryModeAction.do";
}


function doInsertMode()
{

  return "WFLDtlDocTypeNewModeAction.do";
}


function doExecute()
{

  return "WFLDtlDocTypeGetHeaderAction.do";
}


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

function doDelete()
{

  return "WFLDtlDocTypeDeleteAction.do";
  
}

function doRefresh()
{

  return "WFLDtlDocTypeRefreshAction.do";
  
}

function doPrevHeader()
{
  return "WFLDtlDocTypeGetNextHeaderAction.do"; 
}

function doNextHeader()
{
  return "WFLDtlDocTypeGetNextHeaderAction.do"; 
}

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

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

function doAddRow()
{

  return "WFLDtlDocTypeAddRowAction.do"; 
}

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

function doGetDetailTableName()
{
  return "tableName";
}

function doPrevDetail()
{

  return "WFLDtlDocTypeGetDetailPageAction.do";  
}

function doNextDetail()
{

  return "WFLDtlDocTypeGetDetailPageAction.do";
}

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

function doChangeText()
{
  if(document.forms[0].resPasswordFlag.checked)
    {
      document.forms[0].resPass.value = "Y";
    }
  else
    {
      document.forms[0].resPass.value = "N";
    }
}

function ShowCondDesc(i)
{
        document.forms[0].lovKey.value = "DocDtlCode" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "WFL.WFLDtlDocType.dtlDocCode";
        document.forms[0].txtIndex.value=i;
        document.forms[0].queryParam.value="documentId="+document.forms[0].headerPrimaryKey.value;
        document.forms[0].txtDisplayFields.value = "txtConditionId,txtConDesc,txtExp";
         showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','WFLDtlDocTypeDtlForm');
        return true;
       
}

function ShowCode()
{
        document.forms[0].lovKey.value = "Code" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "WFL.WFLDtlDocType.docCode";
        document.forms[0].txtDisplayFields.value = "headerPrimaryKey,documentCode,documentDesc";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','WFLDtlDocTypeDtlForm');
        return true;
 
}

function doValidate()
{
  return "WFLDtlDocTypeValidateAction.do"; 
}
function doOnChangeLov(lovName)
{
  if(lovName=="CodeWflDtlDocTypeQ")
  {
    doBaseValidate();
   }
}

function boxClicked(val)
{    
    if(document.getElementsByName("checked")[val].checked)
    {      
      document.getElementsByName("itemChecked")[val].value = "Y";      
    }
    else
    {     
      document.getElementsByName("itemChecked")[val].value = "N";     
    }      
}
</script>