001/* 002 * Copyright (c) 2009 The openGion Project. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 013 * either express or implied. See the License for the specific language 014 * governing permissions and limitations under the License. 015 */ 016package org.opengion.plugin.column; 017 018import org.opengion.hayabusa.db.AbstractEditor; 019import org.opengion.hayabusa.db.CellEditor; 020import org.opengion.hayabusa.db.DBColumn; 021import org.opengion.fukurou.util.XHTMLTag; 022import org.opengion.fukurou.util.Attributes; 023 024/** 025 * カラムのデータをHIDDENで編集する場合に使用するエディタークラスです。 026 * 027 * つまり、編集して欲しくないが、データは、飛ばしたい場合に使用します。 028 * 029 * カラムの表示に必要な属性は, DBColumn オブジェクト より取り出します。 030 * このクラスは、DBColumn オブジェクト毎に1つ作成されます。 031 * 032 * @og.rev 3.3.3.3 (2003/08/06) 新規作成 033 * @og.group データ編集 034 * 035 * @version 4.0 036 * @author Kazuhiko Hasegawa 037 * @since JDK5.0, 038 */ 039public class Editor_HIDDEN extends AbstractEditor { 040 //* このプログラムのVERSION文字列を設定します。 {@value} */ 041 private static final String VERSION = "5.1.7.0 (2010/06/01)" ; 042 043 /** 044 * デフォルトコンストラクター。 045 * このコンストラクターで、基本オブジェクトを作成します。 046 * 047 */ 048 public Editor_HIDDEN() {} 049 050 /** 051 * コンストラクター。 052 * 053 * @og.rev 3.5.5.7 (2004/05/17) attributes.clear() を追加 054 * @og.rev 3.5.6.0 (2004/06/18) XHTMLTag の 内部配列 INPUT_KEY を隠蔽します。 055 * @og.rev 4.3.6.0 (2009/04/01) eventColumn対応 056 * @og.rev 5.1.7.0 (2010/06/01) 動的プルダウン実装見直し 057 * 058 * @param clm DBColumnオブジェクト 059 */ 060 private Editor_HIDDEN( final DBColumn clm ) { 061 // super( clm ); 062 name = clm.getName(); 063// eventColumn = clm.getEventColumn(); // 4.3.6.0 (2009/04/01) 064// eventURL = clm.getEventURL(); // 4.3.6.0 (2009/04/01) 065// editor = clm.getEditor(); // 4.3.6.0 (2009/04/01) 066 067 attributes = new Attributes(); 068 attributes.set( "type" ,"hidden" ); 069 070 optAttr = null; 071 tagBuffer.add( XHTMLTag.inputAttri( attributes ) ); 072 } 073 074 /** 075 * 各オブジェクトから自分のインスタンスを返します。 076 * 自分自身をキャッシュするのか、新たに作成するのかは、各サブクラスの実装に 077 * まかされます。 078 * 079 * @param clm DBColumnオブジェクト 080 * 081 * @return CellEditorオブジェクト 082 */ 083 public CellEditor newInstance( final DBColumn clm ) { 084 return new Editor_HIDDEN( clm ); 085 } 086}