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 // 4.3.4.4 (2009/01/01) 050// super(); 051 } 052 053 /** 054 * コンストラクター。 055 * 056 * @og.rev 3.5.5.7 (2004/05/17) attributes.clear() を追加 057 * @og.rev 3.5.6.0 (2004/06/18) XHTMLTag の 内部配列 INPUT_KEY を隠蔽します。 058 * @og.rev 4.3.6.0 (2009/04/01) eventColumn対応 059 * @og.rev 5.1.7.0 (2010/06/01) 動的プルダウン実装見直し 060 * 061 * @param clm DBColumnオブジェクト 062 */ 063 private Editor_HIDDEN( final DBColumn clm ) { 064 // super( clm ); 065 name = clm.getName(); 066// eventColumn = clm.getEventColumn(); // 4.3.6.0 (2009/04/01) 067// eventURL = clm.getEventURL(); // 4.3.6.0 (2009/04/01) 068// editor = clm.getEditor(); // 4.3.6.0 (2009/04/01) 069 070 attributes = new Attributes(); 071 attributes.set( "type" ,"hidden" ); 072 073 optAttr = null; 074 tagBuffer.add( XHTMLTag.inputAttri( attributes ) ); 075 } 076 077 /** 078 * 各オブジェクトから自分のインスタンスを返します。 079 * 自分自身をキャッシュするのか、新たに作成するのかは、各サブクラスの実装に 080 * まかされます。 081 * 082 * @param clm DBColumnオブジェクト 083 * 084 * @return CellEditorオブジェクト 085 */ 086 public CellEditor newInstance( final DBColumn clm ) { 087 return new Editor_HIDDEN( clm ); 088 } 089}