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     */
016    package org.opengion.hayabusa.taglib;
017    
018    import org.opengion.hayabusa.common.HybsSystemException;
019    import org.opengion.fukurou.util.StringUtil;
020    import org.opengion.fukurou.util.TagBuffer;
021    
022    /**
023     * JavaScriptを利用してクライアント?で??ブルの左右?します?
024     *
025     * iTable タグは、ガント?体?左右??割表示した?ラ?を?fixedCols 属?に?します?
026     * 通常の view タグの後に記述します?
027     *
028     * @og.formSample
029     * ●形式?lt;og:iTable  ... />
030     * ●body?な?
031     * ●前提:headタグで、adjustEvent="Table" を指定してください?
032     *
033     * ●Tag定義??
034     *   <og:iTable
035     *       fixedCols          【TAG】左右??割で、固定したいカラ?(??)
036     *       debug              【TAG】デバッグ??を?力するかど?[true/false]を指定しま?初期値:false)
037     *   />
038     *
039     * ●使用?
040     *  <og:view
041     *      viewFormType = "HTMLTable"
042     *      command      = "{@command}"
043     *  />
044    
045     *   <og:iTable
046     *       fixedCols  = "5"
047     *   />
048     *
049     * @og.rev 5.6.3.2 (2013/04/12) 新規作?
050     * @og.group 画面部?
051     *
052     * @version  5.0
053     * @author       Kazuhiko Hasegawa
054     * @since    JDK6.0,
055     */
056    public class ViewITableTag extends CommonTagSupport {
057            //* こ?プログラ??VERSION??を設定します?       {@value} */
058            private static final String VERSION = "5.6.3.2 (2013/04/12)" ;
059    
060            private static final long serialVersionUID = 563220130412L ;
061    
062            private TagBuffer tag = new TagBuffer( "iTable" ) ;
063    
064            /**
065             * Taglibの終?グが見つかったときに処??doEndTag() ?オーバ?ライドします?
066             *
067             * @return      後続????
068             */
069            @Override
070            public int doEndTag() {
071                    debugPrint();           // 4.0.0 (2005/02/28)
072    
073                    jspPrint( tag.makeTag() );
074    
075                    return(EVAL_PAGE);              // ペ?ジの残りを評価する?
076            }
077    
078            /**
079             * タグリブオブジェクトをリリースします?
080             * キャ?ュされて再利用される?で、フィールド?初期設定を行います?
081             *
082             */
083            @Override
084            protected void release2() {
085                    super.release2();
086                    tag = new TagBuffer( "iTable" );
087            }
088    
089            /**
090             * 【TAG】左右??割で、固定したいカラ?を指定しま???)?
091             *
092             * @og.tag
093             * ?段?も2段?も?固定したいカラ?を指定します?
094             *
095             * @param   fixedCols 固定したいカラ?
096             */
097            public void setFixedCols( final String fixedCols ) {
098                    tag.add( "fixedCols",StringUtil.nval( getRequestParameter( fixedCols ),null ) );
099            }
100    
101            /**
102             * タグの名称を?返します?
103             * 自??身のクラス名より?自動的に取り出せな?め?こ?メソ?をオーバ?ライドします?
104             *
105             * @return  タグの名称
106             */
107            @Override
108            protected String getTagName() {
109                    return "iTable" ;
110            }
111    
112            /**
113             * こ?オブジェクト???表現を返します?
114             * 基本???目?使用します?
115             *
116             * @return こ?クラスの??表現
117             */
118            @Override
119            public String toString() {
120                    return org.opengion.fukurou.util.ToString.title( this.getClass().getName() )
121                                    .println( "VERSION"             ,VERSION        )
122                                    .println( "tag"                 ,tag.makeTag()  )
123                                    .println( "Other..."    ,getAttributes().getAttribute() )
124                                    .fixForm().toString() ;
125            }
126    }