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 * @og.rev 5.8.1.0 (2014/11/07) HTML5対応?javaScriptで、BODYがな?入れ子になってしま?? 068 * @return 後続???? 069 */ 070 @Override 071 public int doEndTag() { 072 debugPrint(); // 4.0.0 (2005/02/28) 073 074 tag.setBody( "<!-- -->" ); // 5.8.1.0 (2014/11/07) HTML5対応? 075 jspPrint( tag.makeTag() ); 076 077 return(EVAL_PAGE); // ペ?ジの残りを評価する? 078 } 079 080 /** 081 * タグリブオブジェクトをリリースします? 082 * キャ?ュされて再利用される?で、フィールド?初期設定を行います? 083 * 084 */ 085 @Override 086 protected void release2() { 087 super.release2(); 088 tag = new TagBuffer( "iTable" ); 089 } 090 091 /** 092 * 【TAG】左右??割で、固定したいカラ?を指定しま???)? 093 * 094 * @og.tag 095 * ?段?も2段?も?固定したいカラ?を指定します? 096 * 097 * @param fixedCols 固定したいカラ? 098 */ 099 public void setFixedCols( final String fixedCols ) { 100 tag.add( "fixedCols",StringUtil.nval( getRequestParameter( fixedCols ),null ) ); 101 } 102 103 /** 104 * タグの名称を?返します? 105 * 自??身のクラス名より?自動的に取り出せな?め?こ?メソ?をオーバ?ライドします? 106 * 107 * @return タグの名称 108 */ 109 @Override 110 protected String getTagName() { 111 return "iTable" ; 112 } 113 114 /** 115 * こ?オブジェクト???表現を返します? 116 * 基本???目?使用します? 117 * 118 * @return こ?クラスの??表現 119 */ 120 @Override 121 public String toString() { 122 return org.opengion.fukurou.util.ToString.title( this.getClass().getName() ) 123 .println( "VERSION" ,VERSION ) 124 .println( "tag" ,tag.makeTag() ) 125 .println( "Other..." ,getAttributes().getAttribute() ) 126 .fixForm().toString() ; 127 } 128 }