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.view;
017
018import org.opengion.hayabusa.common.HybsSystem;
019import org.opengion.hayabusa.db.DBTableModel;
020import org.opengion.hayabusa.html.AbstractViewForm;
021import org.opengion.fukurou.model.Formatter;
022import org.opengion.fukurou.util.StringUtil;
023
024/**
025 * 検索結果を自動的に表形式に変換する、テーブル作成クラスです。
026 *
027 * AbstractViewForm により、setter/getterメソッドのデフォルト実装を提供しています。
028 * 各HTMLのタグに必要な setter/getterメソッドのみ,追加定義しています。
029 *
030 * AbstractViewForm を継承している為,ロケールに応じたラベルを出力させる事が出来ます。
031 *
032 * @og.group 画面表示
033 *
034 * @version  4.0
035 * @author       Kazuhiko Hasegawa
036 * @since    JDK5.0,
037 */
038public class ViewForm_HTMLTable extends AbstractViewForm {
039        //* このプログラムのVERSION文字列を設定します。   {@value} */
040        private static final String VERSION = "5.7.5.0 (2014/04/04)" ;
041
042        private String  cacheTag         = null;                // 3.5.5.5 (2004/04/23)
043        private boolean isCache          = false;               // 3.5.5.5 (2004/04/23)
044        private int[]   popupClmNo       = null;                // 3.8.6.1 (2006/10/20)
045
046        /** ヘッダー部分のキャッシュ変数 */
047        protected String        headerLine       = null;        // 3.5.2.0 (2003/10/20)
048
049        private final boolean   useRowId         = HybsSystem.sysBool( "USE_CHECKBOX_ROW_ID" ) ;        // 3.6.0.0 (2004/09/17)
050
051        // 5.2.3.0 (2010/12/01) テーブル罫線対応
052        private final String    tableParam       = HybsSystem.sys( "HTML_TABLE_PARAM" ) ;
053
054        // 3.6.0.0 (2004/09/17) チェック済みの行の先頭に、フォーカスを当てる処理
055        private static final String LAYER_FOCUS = "<a href=\"#top\" name=\"h_fcs\" id=\"h_fcs\" ></a>" ;
056
057        private boolean useIE7Header = HybsSystem.sysBool( "USE_IE7_HEADER" );          // 5.7.5.0 (2014/04/04) HTML5 で colgroup が効かない対応
058
059        /**
060         * 内容をクリア(初期化)します。
061         *
062         * @og.rev 3.1.1.0 (2003/03/28) 同期メソッド(synchronized付き)を非同期に変更する。
063         * @og.rev 3.5.2.0 (2003/10/20) ヘッダー繰り返し属性( headerSkipCount )を採用
064         * @og.rev 3.5.5.5 (2004/04/23) cacheTag,isCache 属性追加(チェックボックス作成用)
065         * @og.rev 3.5.6.2 (2004/07/05) bgColorCycle 変数の削除。
066         * @og.rev 3.8.6.1 (2006/10/20) popup の値を返す為のカラム番号配列(popupClmNo)追加
067         * @og.rev 5.1.6.0 (2010/05/01) caption 属性が使われていないため、削除する。
068         */
069        @Override
070        public void clear() {
071                super.clear();
072                cacheTag         = null;                // 3.5.5.5 (2004/04/23)
073                isCache          = false;               // 3.5.5.5 (2004/04/23)
074                popupClmNo       = null;                // 3.8.6.1 (2006/10/20)
075        }
076
077        /**
078         * DBTableModel から HTML文字列を作成して返します。
079         * startNo(表示開始位置)から、pageSize(表示件数)までのView文字列を作成します。
080         * 表示残りデータが pageSize 以下の場合は,残りのデータをすべて出力します。
081         *
082         * @og.rev 3.5.2.0 (2003/10/20) ヘッダー繰り返し属性( headerSkipCount )を採用
083         * @og.rev 3.5.3.1 (2003/10/31) skip属性を採用。headerLine のキャッシュクリア
084         * @og.rev 3.5.5.0 (2004/03/12) No 欄そのものの作成判断ロジックを追加
085         * @og.rev 3.5.6.4 (2004/07/16) ヘッダーとボディー部をJavaScriptで分離
086         * @og.rev 3.7.0.3 (2005/03/01) getBgColorCycleClass に、選択行マーカーを採用
087         * @og.rev 4.3.1.0 (2008/09/08) 編集行のみを表示する属性(isSkipNoEdit)追加
088         * @og.rev 4.3.3.0 (2008/10/01) noTransition属性対応
089         *
090         * @param  startNo        表示開始位置
091         * @param  pageSize   表示件数
092         *
093         * @return      DBTableModelから作成された HTML文字列
094         */
095        public String create( final int startNo, final int pageSize )  {
096                if( getRowCount() == 0 ) { return ""; } // 暫定処置
097
098                headerLine       = null;
099                int lastNo = getLastNo( startNo, pageSize );
100                int blc = getBackLinkCount();
101                int hsc = getHeaderSkipCount();         // 3.5.2.0 (2003/10/20)
102                int hscCnt = 1;                                         // 3.5.2.0 (2003/10/20)
103
104                StringBuilder out = new StringBuilder( HybsSystem.BUFFER_LARGE );
105
106                out.append( getCountForm( startNo,pageSize ) );
107                out.append( getHeader() );
108
109                String ckboxTD = "  <td>";
110
111                out.append("<tbody>").append( HybsSystem.CR );
112                int bgClrCnt = 0;
113                int clmCnt = getColumnCount();  // 3.5.5.7 (2004/05/10)
114                for( int row=startNo; row<lastNo; row++ ) {
115                        if( isSkip( row ) || isSkipNoEdit( row ) ) { continue; } // 4.3.1.0 (2008/09/08)
116                        out.append("<tr").append( getBgColorCycleClass( bgClrCnt++,row ) );
117                        if( isNoTransition() ) { // 4.3.3.0 (2008/10/01)
118                                out.append( getHiddenRowValue( row ) );
119                        }
120                        out.append(">");        // 3.7.0.3 (2005/03/01)
121                        out.append( HybsSystem.CR );
122                        // 3.5.5.0 (2004/03/12) No 欄そのものの作成判断追加
123                        if( isNumberDisplay() ) {
124                                out.append( makeCheckbox( ckboxTD, row, blc ) ).append( HybsSystem.CR );
125                        }
126                        for(int column = 0; column < clmCnt; column++) {
127                                if( isColumnDisplay( column ) ) {
128                                        out.append("  <td>");
129                                        out.append( getValueLabel(row,column) );
130                                        out.append("</td>").append( HybsSystem.CR );
131                                }
132                        }
133                        out.append("</tr>").append( HybsSystem.CR );
134
135                // 3.5.2.0 (2003/10/20) ヘッダー繰り返し属性( headerSkipCount )を採用
136                        if( hsc > 0 && hscCnt % hsc == 0 ) {
137                                out.append( getHeadLine() );
138                                hscCnt = 1;
139                        }
140                        else {
141                                hscCnt ++ ;
142                        }
143                }
144                out.append("</tbody>").append( HybsSystem.CR );
145                out.append("</table>").append( HybsSystem.CR );
146
147                out.append( getScrollBarEndDiv() );     // 3.8.0.3 (2005/07/15)
148
149                return out.toString();
150        }
151
152        /**
153         * 選択用のチェックボックスと行番号と変更タイプ(A,C,D)を表示します。
154         *
155         * @og.rev 3.5.1.0 (2003/10/03) Noカラムに、numberType 属性を追加
156         * @og.rev 3.5.4.0 (2003/11/25) Formatter をローカル変数に変更
157         * @og.rev 3.5.4.1 (2003/12/01) table オブジェクトのセット廃止
158         * @og.rev 3.5.5.5 (2004/04/23) Attributes オブジェクトのセット廃止
159         * @og.rev 3.6.0.0 (2004/09/17) ガントチャートの移動時にチェックするためのIDを追加
160         * @og.rev 3.6.0.0 (2004/09/17) チェック済みの行の先頭に、フォーカスを当てる処理を追加
161         * @og.rev 3.8.6.1 (2006/10/20) popup 用の値を設定する機能を追加
162         *
163         * @param       ckboxTD チェックボックスのタグ(マルチカラム時のrowspan対応)
164         * @param       row      行番号
165         * @param       blc      バックラインカウント(先頭へ戻るリンク間隔)
166         *
167         * @return      tdタグで囲まれたチェックボックスのHTML文字列
168         */
169        protected String makeCheckbox( final String ckboxTD,final int row,final int blc ) {
170                StringBuilder out = new StringBuilder( HybsSystem.BUFFER_MIDDLE );
171
172                DBTableModel table = getDBTableModel() ;
173
174                String opAtt = null;
175                String fmt = getOptionTypeAttributes();
176                if( fmt != null ) {
177                        Formatter format = new Formatter( table );
178                        format.setFormat( fmt );
179                        opAtt = format.getFormatString( row );
180                }
181
182                out.append( ckboxTD );
183                out.append( table.getModifyType( row ) );
184                out.append("</td>");
185                out.append( ckboxTD );
186
187                // 3.5.5.5 (2004/04/23) Attributes オブジェクトのセット廃止
188                String inputTag = makeChboxTag();
189                if( isWritable( row ) && inputTag != null ) {
190                        out.append( inputTag );
191                        if( opAtt != null ) { out.append( opAtt ); }
192                        if( isChecked( row ) ) {
193                                out.append( " checked=\"checked\"" );
194                        }
195                        if( useRowId ) {        // 3.6.0.0 (2004/09/17)
196                                out.append( " id=\"" );
197                                out.append( HybsSystem.ROW_ID_KEY );
198                                out.append( row ).append( "\"" );
199                        }
200                        if( popupClmNo != null ) {      // 3.8.6.1 (2006/10/20)
201                                out = makePopupReturn( out,row );       // 内部で StringBuilder に append しています。
202                        }
203                        out.append( " value=\"" ).append( row ).append( "\" />" );
204                }
205                out.append("</td>");
206                out.append( ckboxTD );
207
208                // 3.5.1.0 (2003/10/03) Noカラムに、numberType 属性を追加
209                if( blc != 0 && (row+1) % blc == 0 ) {
210                        out.append( "<a href=\"#top\">" ).append( getNumberData( row ) ).append( "</a>");
211                } else {
212                        out.append( getNumberData( row ) );
213                }
214
215                // 4.3.5.3 (2008/02/22) Focus2のアンカー位置をtdタグ内に変更
216                if( isFirstChecked( row ) ) {
217                        out.append( LAYER_FOCUS );
218                }
219                out.append("</td>");
220                // if( isFirstChecked( row ) ) {
221                //      out.insert( 0,LAYER_FOCUS );
222                // }
223
224                return out.toString();
225        }
226
227        /**
228         * DBTableModel から テーブルのヘッダータグ文字列を作成して返します。
229         *
230         * @og.rev 3.5.2.0 (2003/10/20) ヘッダーそのもののキャッシュはしない。
231         *
232         * @return      テーブルのヘッダータグ文字列
233         */
234        protected String getHeader() {
235                return getTableTag() + getTableHead() ;
236        }
237
238        /**
239         * DBTableModel から テーブルのタグ文字列を作成して返します。
240         *
241         * @og.rev 3.5.6.4 (2004/07/16) ヘッダーとボディー部をJavaScriptで分離
242         * @og.rev 3.6.0.0 (2004/09/17) ヘッダー固定スクロールの簡素化(スクロールバーを右に出す)
243         * @og.rev 3.6.0.5 (2004/10/18) 印刷時の罫線出力関連機能の追加。id 属性を出力します。
244         * @og.rev 4.0.0.0 (2005/08/31) テーブル表示の CSSファイル利用の有無
245         * @og.rev 5.1.6.0 (2010/05/01) caption 属性が使われていないため、削除する。
246         * @og.rev 5.2.3.0 (2010/12/01) テーブル罫線対応
247         * @og.rev 5.3.4.0 (2011/04/01) テーブル罫線の初期値チェック変更
248         *
249         * @return      テーブルのタグ文字列
250         */
251        protected String getTableTag() {
252                StringBuilder buf = new StringBuilder( HybsSystem.BUFFER_MIDDLE );
253
254                buf.append( getScrollBarStartDiv() );   // 3.8.0.3 (2005/07/15)
255
256                buf.append("<table ");
257                // 5.2.3.0 (2010/12/01) テーブル罫線対応
258                if( tableParam != null && !tableParam.isEmpty() ) {
259                        buf.append( tableParam );
260                        buf.append( " " );
261                }
262                buf.append("id=\"viewTable\" ");
263                buf.append("class=\"").append( getTableClass() ).append( "\"" );
264
265                buf.append(">").append( HybsSystem.CR );
266
267                return buf.toString();
268        }
269
270        /**
271         * HTML5 で colgroup が効かない暫定対応の、処理をまとめるメソッド
272         * 
273         * #viewTable td:nth-child(n) { text-align:right; } CSSを出力するメソッドをまとめました。
274         * 呼び出し元の、getTableHead() のコードをすっきりさせるためのメソッドです。
275         *
276         * @og.rev 5.7.5.0 (2014/04/04) 新規追加
277         *
278         * @return      テーブルのタグ文字列
279         * @see         #getTableHead()
280         */
281        private StringBuilder makeNthChild( final StringBuilder buf , final int ad , final String dbType ) {
282                if( "R".equalsIgnoreCase( dbType ) || "S9".equalsIgnoreCase( dbType ) || "X9".equalsIgnoreCase( dbType ) ) {
283                        buf.append( "  #viewTable td:nth-child(" ).append( ad ).append( ") { text-align:right; }" );
284                        buf.append( HybsSystem.CR );
285                }
286                else if( "BIT".equalsIgnoreCase( dbType ) ) {   // BIT は 真ん中
287                        buf.append( "  #viewTable td:nth-child(" ).append( ad ).append( ") { text-align:center; }" );
288                        buf.append( HybsSystem.CR );
289                }
290
291                return buf ;
292        }
293
294        /**
295         * DBTableModel から テーブルのタグ文字列を作成して返します。
296         *
297         * @og.rev 3.5.1.0 (2003/10/03) Noカラムに、numberType 属性を追加
298         * @og.rev 3.5.2.0 (2003/10/20) ヘッダー繰り返し部をgetHeadLine()へ移動
299         * @og.rev 3.5.3.1 (2003/10/31) VERCHAR2 を VARCHAR2 に修正。
300         * @og.rev 3.5.5.0 (2004/03/12) No 欄そのものの作成判断ロジックを追加
301         * @og.rev 3.5.6.5 (2004/08/09) thead に、id="header" を追加
302         * @og.rev 4.0.0.0 (2005/01/31) DBColumn の 属性(CLS_NM)から、DBTYPEに変更
303         * @og.rev 4.0.0.0 (2005/01/31) 新規作成(getColumnClassName ⇒ getColumnDbType)
304         * @og.rev 5.7.5.0 (2014/04/04) HTML5 で colgroup が効かない暫定対応(真の原因不明)
305         *
306         * @return      テーブルのタグ文字列
307         */
308        protected String getTableHead() {
309                StringBuilder buf = new StringBuilder( HybsSystem.BUFFER_MIDDLE );
310
311                // 5.7.5.0 (2014/04/04) HTML5 で colgroup が効かない対応
312                // 本当は、tableタグの前に入れたかったが、ややこしいので table タグの直後に入れます。
313                // 互換モードでない場合専用。処理速度を気にするより、処理を一か所にまとめておきます。
314                if( !useIE7Header ) {
315                        buf.append( "<style type=\"text/css\">" );
316                        buf.append( HybsSystem.CR );
317                        int ad = 1;
318                        if( isNumberDisplay() ) {
319                                makeNthChild( buf,2,"BIT" );
320                                makeNthChild( buf,3,"S9"  );
321                                ad = 4;
322                        }
323                        int clmCnt = getColumnCount();
324                        for(int column = 0; column < clmCnt; column++) {
325                                if( isColumnDisplay( column ) ) {
326                                        makeNthChild( buf,ad,getColumnDbType(column) );
327                                        ad++ ;                  // tdタグの順番なので、表示する場合のみカウントする。
328                                }
329                        }
330                        buf.append( "</style>" );
331                        buf.append( HybsSystem.CR );
332                }
333
334                // 3.5.5.0 (2004/03/12) No 欄そのものの作成判断追加
335                if( isNumberDisplay() ) {
336                        buf.append("<colgroup class=\"X\" />");         // 4.0.0 (2005/01/31)
337                        buf.append("<colgroup class=\"BIT\" />");
338                        buf.append("<colgroup class=\"S9\" />");                // 4.0.0 (2005/01/31)
339                        buf.append( HybsSystem.CR );
340                }
341
342                int clmCnt = getColumnCount();  // 3.5.5.7 (2004/05/10)
343                for(int column = 0; column < clmCnt; column++) {
344                        if( isColumnDisplay( column ) ) {
345                                buf.append("<colgroup class=\"" );
346                                buf.append( getColumnDbType(column) );          // 4.0.0 (2005/01/31)
347                                buf.append("\"/>");
348                                buf.append( HybsSystem.CR );
349                        }
350                }
351
352        // 3.5.2.0 (2003/10/20) ヘッダー繰り返し部をgetHeadLine()へ移動
353                buf.append("<thead id=\"header\">").append( HybsSystem.CR );    // 3.5.6.5 (2004/08/09)
354                buf.append( getHeadLine() );
355                buf.append("</thead>").append( HybsSystem.CR );
356
357                return buf.toString();
358        }
359
360        /**
361         * ヘッダー繰り返し部を、getTableHead()メソッドから分離。
362         *
363         * @og.rev 3.5.4.5 (2004/01/23) 実装をgetHeadLine( String thTag )に移動
364         *
365         * @return      テーブルのタグ文字列
366         */
367        protected String getHeadLine() {
368                return getHeadLine( "<th" ) ;
369        }
370
371        /**
372         * ヘッダー繰り返し部を、getTableHead()メソッドから分離。
373         *
374         * @og.rev 3.5.2.0 (2003/10/20) 新規作成
375         * @og.rev 3.5.4.3 (2004/01/05) useCheckControl 属性の機能を追加
376         * @og.rev 3.5.4.5 (2004/01/23) thタグの属性設定出来る様に新規追加。
377         * @og.rev 3.5.4.6 (2004/01/30) numberType="none" 時の処理を追加(Noラベルを出さない)
378         * @og.rev 3.5.4.7 (2004/02/06) ヘッダーにソート機能用のリンクを追加します。
379         * @og.rev 3.7.0.1 (2005/01/31) 全件チェックコントロール処理変更
380         *
381         * @param       thTag タグの文字列
382         *
383         * @return      テーブルのタグ文字列
384         */
385        protected String getHeadLine( final String thTag ) {
386                if( headerLine != null ) { return headerLine; }         // キャッシュを返す。
387
388                StringBuilder buf = new StringBuilder( HybsSystem.BUFFER_MIDDLE );
389
390                buf.append("<tr class=\"row_h\"").append(" >").append( HybsSystem.CR );
391
392                // 3.5.5.0 (2004/03/12) No 欄そのものの作成判断追加
393                if( isNumberDisplay() ) {
394                        // 3.5.4.3 (2004/01/05) 追加分
395                        if( isUseCheckControl() && "checkbox".equals( getSelectedType() ) ) {
396                        // 3.5.4.5 (2004/01/23) thタグの属性設定出来る様に変更。
397                                buf.append( thTag ).append("></th>");
398                                buf.append( thTag ).append(">").append( getAllCheckControl() ).append("</th>");
399                                buf.append( thTag ).append(">").append( getNumberHeader() ).append("</th>");    // 3.5.4.6 (2004/01/30)
400                        }
401                        else {
402                        // 3.5.4.5 (2004/01/23) thタグの属性設定出来る様に変更。
403                                buf.append( thTag ).append(" colspan='3'>").append( getNumberHeader() ).append("</th>");        // 3.5.4.6 (2004/01/30)
404                        }
405                }
406
407                buf.append( HybsSystem.CR );
408                int clmCnt = getColumnCount();  // 3.5.5.7 (2004/05/10)
409                for(int column = 0; column < clmCnt; column++) {
410                        if( isColumnDisplay( column ) ) {
411                        // 3.5.4.5 (2004/01/23) thタグの属性設定出来る様に変更。
412                                buf.append( thTag ).append(">");
413                                buf.append( getSortedColumnLabel(column) );
414                                buf.append("</th>").append( HybsSystem.CR );
415                        }
416                }
417                buf.append("</tr>").append( HybsSystem.CR );
418
419                headerLine = buf.toString();
420                return headerLine;
421        }
422
423        /**
424         * フォーマットメソッドを使用できるかどうかを問い合わせます。
425         *
426         * @return  使用可能(true)/ 使用不可能(false)
427         */
428        public boolean canUseFormat() {
429                return false;
430        }
431
432        /**
433         * ogPopup で検索結果の値を返すキーを、CSV形式で指定します。
434         *
435         * popup の検索結果を返す画面で、結果のラジオボタンにイベントセットします。
436         * この場合、オープンもとのwindow に値を返しますが、そのキーをCSV形式で
437         * 指定します。なお、設定は、init 以降(つまり、DBTableModelは設定済み)の
438         * 状態で呼び出してください。(エラーにしません)
439         * なお、このメソッドは、一覧表示(HTMLTable)関係のビューのみでサポートして
440         * いますが、チェックメソッドの関係で、それ以外のビューに適用しても素通り
441         * するようにします。(エラーにしません)
442         *
443         * @og.rev 3.8.6.1 (2006/10/20) 新規追加
444         *
445         * @param  rtnKeys ogPopupで値を返すカラム文字列(CSV形式)
446         */
447        @Override
448        public void setPopupReturnKeys( final String rtnKeys ) {
449                DBTableModel table = getDBTableModel() ;
450                if( table != null && table.getRowCount() > 0 && rtnKeys != null ) {
451                        String[] clmNames = StringUtil.csv2Array( rtnKeys );
452                        popupClmNo = new int[clmNames.length];
453                        for( int i=0; i<clmNames.length; i++ ) {
454                                int no = table.getColumnNo( clmNames[i] );
455                                if( no >= 0 ) { popupClmNo[ i ] = no; }
456                        }
457                }
458        }
459
460        /**
461         * ogPopup で検索結果の値を返すキーを、CSV形式で指定します。
462         *
463         * popup の検索結果を返す画面で、結果のラジオボタンにイベントセットします。
464         * この場合、オープンもとのwindow に値を返しますが、そのキーをCSV形式で
465         * 指定します。なお、設定は、init 以降(つまり、DBTableModelは設定済み)の
466         * 状態で呼び出してください。(エラーにしません)
467         * なお、このメソッドは、一覧表示(HTMLTable)関係のビューのみでサポートして
468         * いますが、チェックメソッドの関係で、それ以外のビューに適用しても素通り
469         * するようにします。(エラーにしません)
470         * rtnPopup に値を渡す場合に、ダブルクオート(")、シングルクオート(')は、
471         * それぞれ、ASCII コード(¥x22、¥x27)に置き換えます。
472         *
473         * @og.rev 3.8.6.1 (2006/10/20) 新規追加
474         *
475         * @param  buf StringBuilder 追加するStringBuilderオブジェクト
476         * @param       rowNo   列番号
477         *
478         * @return      引数にデータを追加した後の同一オブジェクト
479         */
480        private StringBuilder makePopupReturn( final StringBuilder buf,final int rowNo ) {
481                buf.append( " onClick=\"rtnPopup(new Array(" );
482                int clmNo = popupClmNo[ 0 ];
483                String val = StringUtil.quoteFilter( getValue( rowNo,clmNo ) );
484                buf.append( "'" ).append( val ).append( "'" );
485                for( int i=1; i<popupClmNo.length; i++ ) {
486                        clmNo = popupClmNo[ i ];
487                        val = StringUtil.quoteFilter( getValue( rowNo,clmNo ) );
488                        buf.append( ",'" ).append( val ).append( "'" );
489                }
490                buf.append( "));\"" );
491
492                return buf;
493        }
494
495        /**
496         * 選択用のチェックボックスの input タグを作成します。
497         *
498         * @og.rev 3.5.5.5 (2004/04/23) 新規作成
499         *
500         * @return      チェックボックスのinputタグ
501         */
502        private String makeChboxTag() {
503                if( isCache ) { return cacheTag; }
504                isCache = true;
505
506                String type = getSelectedType();                // "checkbox"/"radio"/"hidden"
507
508                if( type != null ) {
509                        StringBuilder buf = new StringBuilder();
510
511                        buf.append( "<input type=\"" ).append( type ).append( "\" " );
512                        buf.append( "name=\"" ).append( HybsSystem.ROW_SEL_KEY ).append( "\"" );
513
514                        cacheTag = buf.toString();
515                }
516                return cacheTag ;
517        }
518
519        /**
520         * カラムのラベル名(短)を返します。
521         * カラムの項目名に対して,見える形の文字列を返します。
522         * 一般には,リソースバンドルと組合せて,各国ロケール毎にラベルを
523         * 切替えます。
524         *
525         * @og.rev 4.0.0.0 (2005/01/31) 新規追加( shortLabel を返します。)
526         *
527         * @param       column カラム番号
528         *
529         * @return      カラムのラベル名(短)
530         */
531        @Override
532        protected String getColumnLabel( final int column ) {
533                return getDBColumn( column ).getShortLabel();
534        }
535}