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     * 積上ガント(?部積上方式)でガント?体(?ージ全体?設定)??を行います?
024     *
025     * iTask タグは、積上ガント??、?部積上方式?場合に使用します?
026     * ?積上げとは、フレー?ーク側で積上げ計算を行う方式?事です?
027     * 処??度は増しますが、積上ガン?JavaScript?は、積上と通常ガント?混在?
028     * 可能ですが、こちら?、積上?みの表示になります?
029     * それぞれの使??けを??してください?
030     * こ?タグは、viewFormType = "HTMLStackedGanttTable" 、innerStack="true" を指定し?view の後に記述します?
031     *
032     * @og.formSample
033     * ●形式?lt;og:iTask  ... />
034     * ●body?な?
035     * ●前提:headタグで、adjustEvent="Task" を指定してください?
036     *
037     * ●Tag定義??
038     *   <og:iTask
039     *       fixedCols          【TAG】左右??割で、固定したいカラ?(??)
040     *       debug              【TAG】デバッグ??を?力するかど?[true/false]を指定しま?初期値:false)
041     *   />
042     *
043     * ●使用?
044     *   <og:view
045     *       viewFormType = "HTMLStackedGanttTable"
046     *       command      = "{@command}"
047     *       writable     = "false"
048     *       useScrollBar = "false"
049     *       useParam     = "true"
050     *       numberType   = "none"
051     *   >
052     *     <!-- stackParamでstackColumnsを指定しなかった?合?customTableとほぼ同じ処?な?-->
053     *     <og:stackParam
054     *         stackColumns = "NOORDER"
055     *         innerStack   = "true"
056     *         costColumns  = "COSTCLM,DYJYU,DYNOKI"
057     *         stackHoliday = "{@stackHoliday}"
058     *         capacityColumn = "CAPACITY"
059     *     />
060     *     <og:thead rowspan="2">
061     *       <tr>
062     *           <td>[NOORDER]</td>
063     *           <td rowspan="2" class="gantt zoom{@SZOOM}" style="text-align:left;background-image: url('../image/stackBG{@SZOOM}.gif');" >
064     *               <div style="position:relative;left:0px;z-index:101; " height="100%" width="100%" >
065     *                   <og:stackHeader
066     *                       startDate   = "{@MIN_DATE}"
067     *                       endDate     = "{@MAX_DATE}"
068     *                       zoom        = "{@SZOOM}"
069     *                       calDB       = "GE13"
070     *                       arg1        = "A"
071     *                   />
072     *               </div>
073     *           </td>
074     *       </tr>
075     *     </og:thead>
076     *     <og:tbody rowspan="2">
077     *       <tr>
078     *         <td>[NOORDER]</td>
079     *       </tr>
080     *     </og:tbody>
081     *   </og:view>
082     *
083     *   <og:iTask
084     *       fixedCols  = "4"
085     *   />
086     *  
087     *   @og.rev 5.6.3.2 (2013/04/12) 新規作?
088     * @og.group 画面部?
089     *
090     * @version  5.0
091     * @author       Kazuhiko Hasegawa
092     * @since    JDK6.0,
093     */
094    public class ViewITaskTag extends CommonTagSupport {
095            //* こ?プログラ??VERSION??を設定します?       {@value} */
096            private static final String VERSION = "5.6.3.2 (2013/04/12)" ;
097    
098            private static final long serialVersionUID = 563220130412L ;
099    
100            private TagBuffer tag = new TagBuffer( "iTask" ) ;
101    
102            /**
103             * Taglibの終?グが見つかったときに処??doEndTag() ?オーバ?ライドします?
104             *
105             * @og.rev 5.8.1.0 (2014/11/07) HTML5対応?javaScriptで、BODYがな?入れ子になってしま??
106             * @return      後続????
107             */
108            @Override
109            public int doEndTag() {
110                    debugPrint();           // 4.0.0 (2005/02/28)
111    
112                    tag.setBody( "<!-- -->" );                // 5.8.1.0 (2014/11/07) HTML5対応?
113                    jspPrint( tag.makeTag() );
114    
115                    return(EVAL_PAGE);              // ペ?ジの残りを評価する?
116            }
117    
118            /**
119             * タグリブオブジェクトをリリースします?
120             * キャ?ュされて再利用される?で、フィールド?初期設定を行います?
121             *
122             */
123            @Override
124            protected void release2() {
125                    super.release2();
126                    tag = new TagBuffer( "iTask" );
127            }
128    
129            /**
130             * 【TAG】左右??割で、固定したいカラ?を指定しま???)?
131             *
132             * @og.tag
133             * ?段?も2段?も?固定したいカラ?を指定します?
134             *
135             * @param   fixedCols 固定したいカラ?
136             */
137            public void setFixedCols( final String fixedCols ) {
138                    tag.add( "fixedCols",StringUtil.nval( getRequestParameter( fixedCols ),null ) );
139            }
140    
141            /**
142             * タグの名称を?返します?
143             * 自??身のクラス名より?自動的に取り出せな?め?こ?メソ?をオーバ?ライドします?
144             *
145             * @return  タグの名称
146             */
147            @Override
148            protected String getTagName() {
149                    return "iTask" ;
150            }
151    
152            /**
153             * こ?オブジェクト???表現を返します?
154             * 基本???目?使用します?
155             *
156             * @return こ?クラスの??表現
157             */
158            @Override
159            public String toString() {
160                    return org.opengion.fukurou.util.ToString.title( this.getClass().getName() )
161                                    .println( "VERSION"             ,VERSION        )
162                                    .println( "tag"                 ,tag.makeTag()  )
163                                    .println( "Other..."    ,getAttributes().getAttribute() )
164                                    .fixForm().toString() ;
165            }
166    }