<?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="query" />

<jsp:directive.include file="/jsp/custom/query_info.jsp" />
<og:comment
	system	= "GF:エンジンサンプル"
	pgid	= "GF6410"
	title	= "ajax動的カラム"
	date	= "2009/04/01"
	author	= "Takahashi Masakazu"
	text	= ""
	version	= "001"
/>
<!-- 担当者名 -->
<og:value command="SQL">
		SELECT	NAME_JA	TMP 
		FROM 	GF44
		WHERE	USERID	=		'{@CDTAN}'
		AND		FGJ		IN	('0','1')
</og:value>

<form method="GET" action="forward.jsp" target="RESULT" onClick="timeSet();">

<!-- 変更はここから -->
<table summary="layout" >
<tr>
	<!-- {@SYS.XXXX} で、SystemResource.properties 設定情報を取得できます。-->
	<!-- ｼｽﾃﾑID -->
	<og:column name="SYSTEM_ID" defaultVal="{@SYS.SYSTEM_ID}" must="true" />
	<!-- カラム -->
	<og:column name="CLM" />
	<!-- 名称 -->
	<og:column name="LABEL_NAME" writable="false" eventColumn="CLM,LANG"
		param="SELECT LABEL_NAME FROM GF41 WHERE SYSTEM_ID='{@SYS.SYSTEM_ID}' AND CLM='{@CLM}' AND LANG='{@LANG}'" />
</tr>
<tr>
	<!-- 言語 -->
	<og:column name="LANG" defaultVal="ja"/>
	<!-- 作成区分 -->
	<!-- eventColumnを利用してDBの値で変更させる例 -->
	<!-- 空のoptionを先頭に出力しておくと、返ってくる箱にも付く(addNoValue="true"化) -->
	<og:select name="KBSAKU" eventColumn="LANG" must="true">
			<og:option value="" lbl="" />
			<og:queryOption>
			<jsp:text>
			SELECT A.CODE,B.LNAME FROM GEA04 A,GEA08 B 
				WHERE A.CLM||'.'||A.CODE = B.CLM 
				AND A.SYSTEM_ID = B.SYSTEM_ID 
				AND A.CLM like 'KBSAKU%' 
				AND B.LANG like '{@LANG}'
				AND B.FGJ = '1' 
				AND B.SYSTEM_ID = '**' 
				AND A.FGJ='1'
				AND ROWNUM &lt; 3
			</jsp:text>
			</og:queryOption>
	</og:select>
	<!-- 孫の作成 -->
	<og:column name="CODE" eventColumn="KBSAKU" editor="TEXT" clazz="aimai" size="5"
		param="SELECT '{@KBSAKU}' as VALUE from GEA10V01" />
	</tr>
<tr>
	<!-- eventColumnでのDB検索での値セット例 -->
	<!-- 親１つに対して子２つをセット -->
	<og:column name="EMPNO" />
		<!-- 標準のmakeColumn.jspはMENU系以外はSQL文のVALUEカラムの値がvalueに入る。 -->
	<og:column name="ENAME" eventColumn="EMPNO"
		param="select ENAME AS VALUE from EMP where EMPNO = '{@EMPNO}' and EMPNO &gt; 1000 "/>
	<og:column name="MGR" eventColumn="EMPNO"
		param="select MGR AS VALUE from EMP where EMPNO = '{@EMPNO}' "/>
</tr>
<tr>	
	<!-- 親の値でeditorを切り替える例 -->
	 <!-- 親の値によってエディタを変更する（独自作成のmakeColumn.jsp利用) -->
	<og:select name="OYA">
		<og:option value="AUTOAREA" lbl="AUTOAREA"/>
		<og:option value="CHBOX" lbl="CHBOX" />
		<og:option value="COLUMN" lbl="COLUMN" />
		<og:option value="CRYPT" lbl="CRYPT" />
		<og:option value="DBMENU" lbl="DBMENU" />
		<og:option value="DBRADIO" lbl="DBRADIO" />
		<og:option value="DECIMAL" lbl="DECIMAL" />
		<og:option value="HIDDEN" lbl="HIDDEN" />
		<og:option value="HTML" lbl="HTML" />
		<og:option value="INDBMENU" lbl="INDBMENU" />
		<og:option value="INMENU" lbl="INMENU" />
		<og:option value="MENU" lbl="MENU" />
		<og:option value="NUMBER" lbl="NUMBER" />
		<og:option value="PASSWD" lbl="PASSWD" />
		<og:option value="PN" lbl="PN" />
		<og:option value="QUERY" lbl="QUERY" />
		<og:option value="RADIO" lbl="RADIO" />
		<og:option value="TEXT" lbl="TEXT" />
		<og:option value="TEXTAREA" lbl="TEXTAREA" />
		<og:option value="UPLOAD" lbl="UPLOAD"/>
		<og:option value="WRITABLE" lbl="WRITABLE" />
		<og:option value="_WRITABLE" lbl="_WRITABLE" />
		<og:option value="YM" lbl="YM" />
		<og:option value="YMD" lbl="YMD" />
		<og:option value="YMD2" lbl="YMD2" />
		<og:option value="YMDH" lbl="YMDH" />
	</og:select>
	 <og:column name="CONDITION" editor="TEXT" value="LANG" eventColumn="OYA" eventURL="makeColumn6410.jsp"
		 param="{@OYA}" />
</tr>
</table>

<og:queryButton >
<!-- 表示順 -->
	<table>
	<tr>
		<og:select name="ORDER_BY" lbl="ORDER_BY" >
			<og:option value="SYSTEM_ID,CLM,LANG"        lbl ="CLM"     selected="selected" />
			<og:option value="SYSTEM_ID,LANG,NAME_JA"    lbls="LANG,NAME_JA"    />
			<og:option value="SYSTEM_ID,LANG,LABEL_NAME" lbls="LANG,LABEL_NAME" />
		</og:select>
		<td>
			<span id="hideMenuTest"></span>
		</td>
	</tr>
	</table>
</og:queryButton>
</form>

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