<?xml version="1.0" encoding="UTF-8" ?>
<jsp:root
	xmlns:jsp="http://java.sun.com/JSP/Page"
	xmlns:og="hybs-taglib.tld"
	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:comment
	system   = "GE:エンジンサンプル"
	pgid     = "GE0003"
	title    = "カラム"
	date     = "2007/12/12"
	author   = "K.HASEGAWA"
	text     = "ZZZZ"
	version  = "001"
>
	5.5.1.5 Takahashi Masakazu BulkSet対応
</og:comment>

<!-- データが選ばれていなければエラー -->
<og:equals val1="{@sysins}" val2="true">
	<og:columnCheck
		checkType = "NEW"
		nullCheck = "SYSTEM_ID">
		<jsp:directive.include file="/jsp/common/history_back.jsp" />
	</og:columnCheck>
</og:equals>

<og:columnCheck command="{@command}">
	<jsp:directive.include file="/jsp/common/history_back.jsp" />
</og:columnCheck>

<og:entry command="{@command}" repeatCount="{@repeatCount}">
	<og:columnSet command="{@command}" columnId="RDC_CODE" action="SET" value="{@USER.RDC_CODE}" />
	<og:columnSet command="COPY"   columnId="KBSAKU"   action="SET" value="1" conditionKey="KBSAKU" conditionList="0" />
	<og:columnSet command="COPY"   columnId="CDKH" action="NULLSET" value="A" />
	<og:columnSet command="MODIFY" columnId="CDKH" action="NULLSET" value="C" />
	<og:columnSet command="DELETE" columnId="CDKH" action="NULLSET" value="D" />
	<og:columnSet command="COPY"   columnId="CLM"  action="NULLSET" value="{@MEM.CLM}" />

	<og:columnSet command="COPY" columnId="SYSTEM_ID" action="NULLSET" value="{@MEM.SYSTEM_ID}" />
	<og:equals val1="{@sysins}" val2="true">
		<og:columnSet command="COPY" columnId="SYSTEM_ID" action="SET" value="{@SYSTEM_ID}" />
	</og:equals>
</og:entry>

<!-- 6.9.0.0 (2018/01/31) カラムリソース削除するときに帳票のレイアウト定義に使われてるカラムのチェック  (61200-180130-07) -->
<og:equals val1="{@command}" val2="DELETE" >
	<og:value command="SETTBL" action="APPEND" key="CLM" separator="','" />			<!-- 選択カラムの集合 -->
	<og:value command="SQL" action="ROW_APPEND" >										<!-- GE52 ﾚｲｱｳﾄﾃｰﾌﾞﾙのﾁｪｯｸ -->
		select CLM || ' ( {@LBL.LISTID}=' || LISTID || ' )' as CHK_CLM
		from GE52
		where SYSTEM_ID='{@MEM.SYSTEM_ID}' and CLM in ('{@CLM}')
		order by LISTID,CLM
	</og:value>
	<og:equals val1="{@CHK_CLM}" nullCheck="true" notEquals="true">
	  <b>
		<og:message lbl="ERR0014" val0="{@CHK_CLM}" val1="{@LBL.REP03}" /><br />		<!-- マスター登録済みエラー -->
		<og:message lbl="MSG0075"  /><br />												<!-- 処理を実行しますか？ -->
	  </b>
	</og:equals>
</og:equals>

<og:message command="{@command}" /><br />
<form onSubmit="return oneClick();" method="POST" action="forward.jsp" target="RESULT">
<og:writeCheck>
	<og:submit  value="entry"   lbl="ENTRY" accesskey="E" />
	<og:submit  value="reset"   lbl="RESET" accesskey="R" />
	<og:input type="reset"  name="command"  lbl="MSG0011"  td="false" />
	<og:input type="checkbox" name="errRemove" value="true" td="no" />
</og:writeCheck>

<og:view
	viewFormType  = "HTMLTable"
	command       = "{@command}"
	noDisplay     = "UNIQ,EXIST_GEA08,UNIQ_GEA08"
	columnWritable= "{@columnWritable}"
	noWritable    = "{@noWritable}"
	checked       = "{@checked}"
	startNo       = "{@startNo}"
	pageSize      = "{@pageSize}"
	columnBulkSet = "*" />

<og:hidden name="sqlType" defaultVal="{@command}" value="{@sqlType}" />
<og:hidden name="logicalDelete" value="{@logicalDelete}" />

</form>

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