<?xml version="1.0" encoding="UTF-8" ?>
<jsp:root
	xmlns:jsp="http://java.sun.com/JSP/Page"
	xmlns:og="hybs-taglib.tld"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	version="2.0">
<jsp:directive.page language="java" contentType="text/html; charset=UTF-8" />
<og:head headType="result" />

<jsp:directive.include file="/jsp/custom/result_info.jsp" />

<og:errorMessage command="{@command}" clear="{@clear}" displayMsg="{@displayMsg}" />
<og:columnCheck command="{@command}" />
<og:entry command="{@command}" />


<b><font color="red">[STEP2] カラム単位の仕様を入力します。</font></b>

<form method="POST" action="forward.jsp" target="EDTCLM">

<og:value command="SET" key="C_KEYS" value="{@NAMES}" action="APPEND" />

<c:forTokens items = "${C_KEYS}" delims = "," var = "C_KEY" >
	<og:value command="SQL">
		<og:text>
			select count(*) CNT from gfx02
			where guiid='{@GUIID}' and tableid='{@TABLE_NAME}' and clm='{@C_KEY}'
		</og:text>
	</og:value>
	<og:equals val1="{@CNT}" val2="0">
		<og:query command="NEW">
			insert into gfx02( guiid, tableid, clm ) values ( '{@GUIID}', '{@TABLE_NAME}', '{@C_KEY}' )
		</og:query>
	</og:equals>
</c:forTokens>

<og:query command="NEW">
	select * from gfx02 where guiid='{@GUIID}'
</og:query>

<og:writeCheck>
	<og:submit  value="koumoku_update"   command="COPY"   lbl="COPY"    accesskey="C"
			keys="noWritable" vals="GUIID" />
	<og:submit  value="koumoku_update"   command="MODIFY" lbl="MODIFY"  accesskey="M" 
			keys="noWritable" vals='"GUIID,TABLEID,CLM"' />
	<og:submit  value="koumoku_update"   command="DELETE" lbl="DELETE"  accesskey="Z" 
			keys="columnWritable" vals="null" />
	<br />
</og:writeCheck>

<og:view
	viewFormType = "HTMLTable"
	command    = "{@command}"
/>

</form>

<jsp:directive.include file="/jsp/common/htmlend.jsp" />
</jsp:root>
