<%--
<%@ page import="java.io.*, java.util.*"%>
<%@ page language="java" contentType="text/html;charset=utf-8"%>
<%@ page import="com.eactive.eai.transformer.layout.Layout"%>
<%@ page import="com.eactive.eai.transformer.layout.LayoutItem"%>
<%@ page import="com.eactive.eai.transformer.layout.LayoutManager"%>
<%@ page import="com.eactive.eai.transformer.util.TransformKeys"%>
<%@ page import="java.util.HashMap"%>
<%@ taglib uri="netui-tags-databinding.tld" prefix="netui-compat-data"%>
<%@ taglib uri="netui-tags-html.tld" prefix="netui-compat"%>
<%@ taglib uri="netui-tags-template.tld" prefix="netui-compat-template"%>

<%!
	/**
	* <pre>
	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
	* </pre>
	* @param	String		변환 대상
	* @return	'String'
	*/
	public static String checkNull( String str ) {

		String sResult = new String();
		if ( str == null ) {
			sResult = "";
		}
		else {
			sResult = str.trim();
		}
		return sResult;
	}

%>

<%
    String layoutName = (String)request.getParameter("layoutName");
    String itemName = (String)request.getParameter("itemName");
    
    LayoutManager manager = LayoutManager.getManager();
    Layout  layout = manager.getLayoutByName(layoutName);
    LayoutItem item = null;
    
    if(layout != null ) {
        layout.updateItemNameMap();
        item = layout.getItemByPath(itemName);
    } else {
        System.out.println("layoutItem.jsp ] layout is null - " +layoutName);   
    }
    if(item == null ) {
        System.out.println("layoutItem.jsp ] layoutItem is null - " +itemName);   
    }    
    
%>


<html>
    <head>
        <title>
            Transform LayoutItem Manager
        </title>
         <script>
        function doAction() {
            document.frm.submit();
        }
        
        function goto(name) {
            var one  = document.frm;
            one.layoutNames.value = name;
            one.action = "<%=request.getContextPath()%>/mgr/transformer/layout.jsp";
            one.submit();
            //var url = 'layout.jsp?layoutName='+name;
            //msgWindow=window.open(url);
        }
        
        </script>
    </head>
    <body>
        <p style="font-size:12pt;">
        <b>Transform LayoutItem Configuration</b> <br><br>
        </p>
        <form name="frm" action="">
        <input type="hidden" name="layoutNames" value="">
        
        <table border='0' width="800" >
        <tr>
        <td align='right'>
            <input name="back Layout" value="back Layout" type="button" onclick="javascript:goto('<%=layoutName%>');">
        </td>

        </tr>
        </table><br>
        <table width="800" border=0 bgcolor='black' cellpadding="1" cellspacing="1">
        <tr bgcolor='white'>
            <td align='right' colspan='2' width='350' bgcolor="#003366">&nbsp; <font color="yellow"><b>Layout정보</b> &nbsp;</font></td>
            
        </tr>

<%
    if(layout != null ){
        
%>

        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 레이아웃명 : &nbsp;</td>
            <td align='left'>&nbsp;<%=layout.getName()%></td>
        </tr>
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 레이아웃유형명 : &nbsp;</td>
            <td align='left'>&nbsp;<%=layout.getLayoutType().getName()%></td>
        </tr>
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 레이아웃설명 : &nbsp;</td>
            <td align='left'>&nbsp;<%=layout.getDescription()%></td>
        </tr>
        
<%
} else {
%>    
        <tr bgcolor='white'>
            <td align='center' colspan="2" >&nbsp; 요청하신 Layout 정보가 없습니다. &nbsp;</td>
        </tr>

<%
}
%>
        </table>
<br>
        <table width="800" border=0 bgcolor='black' cellpadding="1" cellspacing="1">
        <tr bgcolor='white'>
            <td align='right' colspan='2' width='350' bgcolor="#003366">&nbsp; <font color="yellow"><b>LayoutItem 정보</b> &nbsp;</font></td>            
        </tr>
<%
if (item != null ) {
%>
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 레이아웃항목일련번호 : &nbsp;</td>
            <td align='left'>&nbsp;<%=item.getSeqNo()%></td>
        </tr>
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 레이아웃항목명 : &nbsp;</td>
            <td align='left'>&nbsp;<%=item.getName()%></td>
        </tr>
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 부모레이아웃항목 : &nbsp;</td>
            <td align='left'>&nbsp;<%=item.getParent().getName()%></td>
        </tr>
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 레이아웃항목설명 : &nbsp;</td>
            <td align='left'>&nbsp;<%=item.getDescription()%></td>
        </tr>
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 레이아웃항목노드유형 : &nbsp;</td>
            <td align='left'>&nbsp;<%=TransformKeys.getLoutItemNodePtrnID(item.getNodeTypeId())%></td>
        </tr>
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 레이아웃항목유형명 : &nbsp;</td>
            <td align='left'>&nbsp;<%=TransformKeys.getType(item.getItemTypeId())%></td>
        </tr>
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 레이아웃항목경로명 : &nbsp;</td>
            <td align='left'>&nbsp;<%=item.getPath()%></td>
        </tr>
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 레이아웃항목길이수 : &nbsp;</td>
            <td align='left'>&nbsp;<%=item.getLength()%></td>
        </tr>
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 레이아웃항목참조정보 : &nbsp;</td>
            <td align='left'>&nbsp;<%=item.getRefInfo()%></td>
        </tr>
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 레이아웃항목참조정보2 : &nbsp;</td>
            <td align='left'>&nbsp;<%=item.getRefOcc()%></td>
        </tr>
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 레이아웃항목발생유형구분코드 : &nbsp;</td>
            <td align='left'>&nbsp;<%=item.getOccType()%></td>
        </tr>
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 레이아웃항목최대발생건수 : &nbsp;</td>
            <td align='left'>&nbsp;<%=item.getOccMax()%></td>
        </tr>
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 레이아웃항목최소발생건수 : &nbsp;</td>
            <td align='left'>&nbsp;<%=item.getOccMin()%></td>
        </tr>
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 레이아웃항목기본값 : &nbsp;</td>
            <td align='left'>&nbsp;<%=item.getDefaultValue()%></td>
        </tr>
        <tr bgcolor='white'>
            <td align='right' width='350' bgcolor="#ccccff">&nbsp; 레이아웃항목마스킹여부 : &nbsp;</td>
            <td align='left'>&nbsp;<%=item.getMask()%></td>
        </tr>

<%
} else {
%>    
        <tr bgcolor='white'>
            <td align='center' colspan="2" >&nbsp; 요청하신 LayoutItem 정보가 없습니다. &nbsp;</td>
        </tr>

<%
}
%>

        </table>
        </form>
    </body>
</html>
--%>