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 static org.opengion.fukurou.util.StringUtil.nval;
019
020 import org.opengion.fukurou.util.XHTMLTag;
021 import org.opengion.hayabusa.common.HybsSystem;
022 import org.opengion.hayabusa.resource.GUIInfo;
023
024 /**
025 * ãƒ?‚ストフィールドã?入力を補助ã™ã‚‹ãƒãƒƒãƒ—ã‚¢ãƒ??を作æ?ã—ã¾ã™ã?
026 *
027 * 通常ã®ãƒ?‚ストフィールドã«çµ?¿è¾¼ã‚?‚±ãƒ¼ã‚¹ã¨ã€ä¸?¦§è¡¨ã«çµ?¿è¾¼ã‚?‚±ãƒ¼ã‚¹ã«å¯¾å¿œã—ã¦ã?¾ã™ã?
028 * 基本çš?«ã¯ã€columnMarker ã‚¿ã‚°ã¨åŒã˜ä½¿ã?–¹ã§ã™ãŒã€ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ãŒæ›¸ãè¾¼ã¿è¨±å¯æ™‚ã«è¡¨ç¤ºã•ã›ã‚‹å¿?¦ãŒ
029 * ã‚ã‚‹ãŸã‚ã€å®Ÿéš›ã«ã¯ã€viewMarker ã® isRendere="false" ã§ä½¿ç”¨ã™ã‚‹ã‚±ãƒ¼ã‚¹ãŒå¤šã„ã¨æ€ã„ã¾ã™ã?
030 * ãªãŠã?ãƒãƒƒãƒ—ã‚¢ãƒ??専用ãªã®ã§ href="index.jsp" target="CONTENTS" ãŒãƒ‡ãƒ•ォルトã§è¨å®šã•れã¦ã?¾ã™ã?
031 *
032 * @og.formSample
033 * â—å½¢å¼ï¼?lt;og:popup gamenId="…" href="…" keys="…,…" vals="…,…" rtnKeys="…,…" />
034 * â—body?šãªã?
035 *
036 * â—Tag定義??
037 * <og:popup
038 * name ã€TAG】ã“ã®è¦ç´?‚’リンクã®å¯¾è±¡ã¨ã™ã‚‹ãŸã‚ã®åå‰ã‚’指定ã—ã¾ã?
039 * gamenId ã€TAG】画é¢ID属æ?を登録ã—ã¾ã?
040 * href ã€TAG】ã?ãƒ??ã‚¢ãƒ??å…ˆã?URLを指定ã—ã¾ã?åˆæœŸå€¤:index.jsp)
041 * keys ã€TAG】ã?ãƒ??ã‚¢ãƒ??å…ˆã«æ¸¡ã™å?力ã‚ーé…å?ã‚’CSVå½¢å¼ã§è¤?•°æŒ?®šã—ã¾ã?
042 * vals ã€TAG】ã?ãƒ??ã‚¢ãƒ??å…ˆã«æ¸¡ã™å?é…å?ã‚’CSVå½¢å¼ã§è¤?•°æŒ?®šã—ã¾ã?
043 * rtnKeys ã€TAG】ã?ãƒ??ã‚¢ãƒ??先よりå—ã‘å–ã‚‹ã‚ーé…å?ã‚’CSVå½¢å¼ã§è¤?•°æŒ?®šã—ã¾ã?
044 * column ã€TAG】リンクをã¤ã‘ãŸã?‚«ãƒ©ãƒ?‚’æŒ?®šã—ã¾ã?
045 * onMark ã€TAG】リンクを張ã‚?true or 1)/張らãªã?false or 0)ã®è¨å®šã‚’æŒ?®šã—ã¾ã?åˆæœŸå€¤:true)
046 * markList ã€TAG】å?ç?™ã‚‹ã?ークをã?"|"区åˆ?‚Šã®æ–?—å?ã§æŒ?®šã—ã¾ã?
047 * height ã€TAG】ダイアãƒã‚°ã®ç¸¦å¹?‚’ãƒ”ã‚¯ã‚»ãƒ«æ•°ã§æŒ?®šã—ã¾ã?
048 * width ã€TAG】ダイアãƒã‚°ã®æ¨ªå¹?‚’ãƒ”ã‚¯ã‚»ãƒ«æ•°ã§æŒ?®šã—ã¾ã?
049 * src ã€TAG】表示ã•ã›ã‚‹ç”»åƒã?URLを指定ã—ã¾ã?
050 * charset ã€TAG】ã?ãƒ??ã‚¢ãƒ??å…ˆã?æ–?—コードセãƒ?ƒˆã‚’指定ã—ã¾ã?
051 * target ã€TAG】ã?ãƒ??ã‚¢ãƒ??å…ˆã?表示ターゲãƒ?ƒˆã‚’指定ã—ã¾ã?åˆæœŸå€¤:CONTENTS)
052 * caseKey ã€TAG】ã“ã®ã‚¿ã‚°è‡ªä½“を利用ã™ã‚‹ã‹ã©ã?‹ã®æ¡ä»¶ã‚ーを指定ã—ã¾ã?åˆæœŸå€¤:null)
053 * caseVal ã€TAG】ã“ã®ã‚¿ã‚°è‡ªä½“を利用ã™ã‚‹ã‹ã©ã?‹ã®æ¡ä»¶å€¤ã‚’指定ã—ã¾ã?åˆæœŸå€¤:null)
054 * caseNN ã€TAG】指定ã?値ãŒã?null/ã‚¼ãƒæ–?—å? ã§ãªã??å?Not Null=NN)ã¯ã€ã“ã®ã‚¿ã‚°ã¯ä½¿ç”¨ã•れã¾ã?åˆæœŸå€¤:true)
055 * caseNull ã€TAG】指定ã?値ãŒã?null/ã‚¼ãƒæ–?—å? ã®å ´åˆã?ã€ã“ã®ã‚¿ã‚°ã¯ä½¿ç”¨ã•れã¾ã?åˆæœŸå€¤:true)
056 * id ã€HTML】è¦ç´?«å¯¾ã—ã¦å›ºæœ‰ã?åå‰(id)ã‚’ã¤ã‘ã‚‹å ´åˆã«è¨å®šã—ã¾ã?
057 * lang ã€HTML】è¦ç´??å†?®¹ã¨ä»–ã?属æ?値ã®è¨?ª?lang,xml:lang)を指定ã—ã¾ã?
058 * dir ã€HTML】文å—表記ã?æ–¹å?dir)を指定ã—ã¾ã?
059 * title ã€HTML】è¦ç´?«å¯¾ã™ã‚‹è£œè¶³çš?ƒ…å ±(title)ã‚’è¨å®šã—ã¾ã?
060 * style ã€HTML】ã“ã®è¦ç´?«å¯¾ã—ã¦é©ç”¨ã•ã›ã‚‹ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒ?style)ã‚’è¨å®šã—ã¾ã?
061 * tabindex ã€HTML】タブã?移動é?(tabindex)を指定ã—ã¾ã?0 ??32767)
062 * accesskey ã€HTML】アクセスã‚ー(alt+ã‚ーã§ç›´æŽ¥æŒ?®?を割り当ã¦ã¾ã?
063 * clazz ã€HTML】è¦ç´?«å¯¾ã—㦠class 属æ?ã‚’è¨å®šã—ã¾ã?
064 * lbl ã€TAG】ラベルリソースã®ãƒ©ãƒ™ãƒ«IDを指定ã—ã¾ã?
065 * language ã€TAG】タグå†?ƒ¨ã§ä½¿ç”¨ã™ã‚‹è¨?ªžã‚³ãƒ¼ãƒ‰[ja/en/zh/…]を指定ã—ã¾ã?
066 * command ã€TAGã€?通常使ã?¾ã›ã‚“)処ç??実行をæŒ?®šã™ã‚?command ã‚’è¨å®šã§ãã¾ã?åˆæœŸå€¤:NEW)
067 * append ã€TAG】返ã£ã¦ããŸå€¤ã‚’ã‚ャレãƒ?ƒˆä½ç½®ã«è¿½è¨˜ã™ã‚‹ã‹ã©ã?‹(åˆæœŸå€¤?šfalse)
068 * debug ã€TAG】デãƒãƒƒã‚°æƒ??ã‚’å?力ã™ã‚‹ã‹ã©ã?‹[true/false]を指定ã—ã¾ã?åˆæœŸå€¤:false)
069 * />
070 *
071 * â—使用ä¾?
072 * ・普通ã?ãƒãƒƒãƒ—ã‚¢ãƒ??
073 * <og:popup gamenId="GE0002" href="index.jsp" target="CONTENTS"
074 * keys="AAA,BBB,CCC" vals="{@AAA},{@B},ABC"
075 * rtnKeys="DDD,EEE" />
076 *
077 * ・QUERYã®å…¥åŠ›ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«çµ?¿è¾¼ã‚?
078 * â‘?eysã€valsã€rtnKeys ãŒã‚»ãƒ?ƒˆã•れるå?å?
079 * ã€??ã€??ã‚»ãƒ?ƒˆã•れã‚?keys ã«å¯¾ã—㦠vals ã®å€¤ã‚’ã?ãƒ??ã‚¢ãƒ??ç”»é¢ã«æ¸¡ã—ã?ãƒãƒƒãƒ—ã‚¢ãƒ??ç”»é¢ã®æˆ»ã‚Šå?ã‚?rtnKeys ã«ã‚»ãƒ?ƒˆã•れã¾ã™ã?
080 * <og:column name="AAA" value="{@AAA}" >
081 * <og:popup gamenId="GE0002"
082 * keys="AAA,BBB,CCC" vals="{@AAA},{@B},ABC"
083 * rtnKeys="DDD,EEE" />
084 * </og:column>
085 * â‘¡keysã€valsã€rtnKeys ãŒã‚»ãƒ?ƒˆã•れãªã??å?
086 * ã€??ã€?? ãƒãƒƒãƒ—ã‚¢ãƒ??ç”»é¢ã«ãƒªã‚¯ã‚¨ã‚¹ãƒˆå¤‰æ•° XNAME ã«å¤–å?ã®ã‚«ãƒ©ãƒ?ã€XVALUE ã«ã‚«ãƒ©ãƒ??入力å?ã€rtnKeys ã«ã‚«ãƒ©ãƒ?ã‚’è?å‹•çš„ã«ã‚»ãƒ?ƒˆã•れã¾ã™ã?
087 * <og:column name="AAA" value="{@AAA}" >
088 * <og:popup gamenId="GE0002" />
089 * </og:column>
090 *
091 * ・RESULTã®å…¥åŠ›ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«çµ?¿è¾¼ã‚?viewMarker 経由)
092 * gamenId を指定ã—ãªã‘れã°ã“ã?ç”»é¢ã¸ã®URLを作æ?ã—ã¾ã™ã?
093 * ã“ã?URLã¯ã€ãã®ç”»é¢ã® index.jsp ã«ç›´æŽ¥ã‚¸ãƒ£ãƒ³ãƒ—ã™ã‚‹ãŸã‚ã?URLã§ã™ã?
094 * <og:viewMarker command="{@command}" isRenderer="false">
095 * <og:popup gamenId="GE0002" column="ABC" onMark="[ABC]" markList="1|2|3"
096 * keys="AAA,BBB,CCC" vals="[AAA],[BBB].value,{@CCC}"
097 * rtnKeys="DDD,EEE" />
098 * </og:viewMarker>
099 *
100 * ・ãƒãƒƒãƒ—ã‚¢ãƒ??å´ã®JSPファイル(view 部åˆ?
101 *
102 * @og.group ç”»é¢éƒ¨å“?
103 * @og.rev 3.8.6.1 (2006/10/20) æ–°è¦ä½œæ?
104 *
105 * @version 0.9.0 2000/10/17
106 * @author Kazuhiko Hasegawa
107 * @since JDK1.1,
108 */
109 public class PopupTag extends HTMLTagSupport {
110 //* ã“ã?プãƒã‚°ãƒ©ãƒ??VERSIONæ–?—å?ã‚’è¨å®šã—ã¾ã™ã? {@value} */
111 private static final String VERSION = "5.2.2.0 (2010/11/01)" ;
112
113 private static final long serialVersionUID = 522020101101L ;
114
115 private static final String DEF_BODY = "â–¼" ;
116 private static final String DEF_STYLE = "width:20px;text-align:center;" ;
117
118 private String column = null;
119 private String gamenId = null;
120 private String href = "index.jsp";
121 private String target = "CONTENTS";
122 private String onMark = "true"; // true ã¾ãŸã? 1
123 private String markList = "true|TRUE|1"; // true ã¾ãŸã? 1
124 private String height = null;
125 private String width = null;
126 private String imgsrc = null;
127 private String[] keys = null;
128 private String[] vals = null;
129 private String[] rtnKeys = null;
130
131 /** command å¼•æ•°ã«æ¸¡ã™äº‹ã?出æ¥ã‚?コマンãƒ? æ–°è¦?{@value} */
132 private static final String CMD_NEW = "NEW" ; // 5.1.7.0 (2010/06/01)
133 private String command = CMD_NEW; // 5.1.7.0 (2010/06/01)
134
135 private String append = "false"; // 5.8.5.0 (2015/03/06)
136
137 /**
138 * Taglibã®çµ‚äº?‚¿ã‚°ãŒè¦‹ã¤ã‹ã£ãŸã¨ãã«å‡¦ç?™ã‚?doEndTag() ã‚?オーãƒã?ライドã—ã¾ã™ã?
139 *
140 * @og.rev 5.2.2.0 (2010/11/01) caseKey ã€caseVal 属æ?対å¿?
141 *
142 * @return 後続å?ç??æŒ?¤º
143 */
144 @Override
145 public int doEndTag() {
146 // 5.2.2.0 (2010/11/01) caseKey ã€caseVal 属æ?対å¿?
147 if( useTag() ) {
148 makeGamenLink();
149
150 // GAMENID属æ?ã®?µ?²?¬ã¸ã®è‡ªå‹•ã‚»ãƒ?ƒˆã¯è¡Œã‚ãªã??
151 ViewMarkerTag viewMark = (ViewMarkerTag)findAncestorWithClass( this,ViewMarkerTag.class );
152 if( viewMark != null ) {
153 set( "onMark" ,onMark );
154 set( "markList",markList );
155 set( "body" ,makePopup( true ) );
156
157 if( column != null && column.length() > 0 ) {
158 set( "column" ,column ); // 4.0.0 (2005/08/31) åŒä¸?‚«ãƒ©ãƒ??è¤?•°ç™»éŒ²ã‚’許å¯ã—ã¾ã™ã?
159 viewMark.addAttribute( getAttributes() );
160 }
161 }
162 else {
163 if( markList.indexOf( onMark ) >= 0 ) {
164 jspPrint( makePopup( false ) );
165 }
166 }
167 }
168 return(EVAL_PAGE);
169 }
170
171 /**
172 * 使用ã—ã¾ã›ã‚“ã€?
173 *
174 * @return (null 固�
175 */
176 @Override
177 protected String makeTag() { return null; }
178
179 /**
180 * タグリブオブジェクトをリリースã—ã¾ã™ã?
181 * ã‚ャãƒ?‚·ãƒ¥ã•れã¦å†åˆ©ç”¨ã•れるã?ã§ã€ãƒ•ィールドã?åˆæœŸè¨å®šã‚’行ã„ã¾ã™ã?
182 *
183 */
184 @Override
185 protected void release2() {
186 super.release2();
187 column = null;
188 gamenId = null;
189 href = "index.jsp";
190 target = "CONTENTS";
191 onMark = "true"; // true ã¾ãŸã? 1
192 markList = "true|TRUE|1"; // true ã¾ãŸã? 1
193 keys = null;
194 vals = null;
195 rtnKeys = null;
196 height = null;
197 width = null;
198 imgsrc = null;
199 command = CMD_NEW; // 5.1.7.0 (2010/06/01)
200 append = "false"; // 5.8.5.0 (2015/03/66)
201 }
202
203 /**
204 * リンクを作æ?ã—ã¾ã™ã?
205 *
206 * @og.rev 4.2.4.0 (2008/07/01) keys,vals,rtnKeysãŒè¨å®šã•れã¦ã?ªã??åˆã?外å?ã®og:columnã‚¿ã‚°ã®name値をè¨å®šã™ã‚‹ã‚ˆã?«å¤‰æ›´
207 * @og.rev 5.1.7.0 (2010/06/01) 引数ã«commandを追åŠ?
208 * @og.rev 5.2.1.0 (2010/10/01) heightã€width ã«ã¯ã€?px" ãªã©ã®å˜ä½ã‚’付ã‘ã‚‹å‰æã§ã®å¯¾å¿?
209 * @og.rev 5.2.2.0 (2010/11/01) heightã€width ã?null ã®å ´åˆã?ã€ã‚·ãƒ³ã‚°ãƒ«ã‚¯ã‚ªãƒ¼ãƒˆã‚’ã¤ã‘ãªã??
210 * @og.rev 5.8.5.0 (2015/03/06) append追�
211 *
212 * @param useKey [true:KEY付ã/false:KEYç„¡ã—]
213 *
214 * @return リンクタグæ–?—å?
215 */
216 private String makePopup( final boolean useKey ) {
217 StringBuilder rtn = new StringBuilder();
218 // rtn.append( "ogPopup( '" ).append( get( "href" ) ).append( "'," );
219 // rtn.append( height ).append( "," ).append( width ).append( "," );
220 // 5.2.1.0 (2010/10/01) px を付ã‘ã‚‹ã¨æ•°å—ã§ã¯ãªããªã‚‹ãŸã‚ã?シングルクオーãƒ??ションã§ããã‚‹ã?
221 rtn.append( "ogPopup( '" ).append( get( "href" ) ).append( "'," );
222 // 5.2.2.0 (2010/11/01) heightã€width ã?null ã®å ´åˆã?ã€ã‚·ãƒ³ã‚°ãƒ«ã‚¯ã‚ªãƒ¼ãƒˆã‚’ã¤ã‘ãªã??
223 if( height != null ) { rtn.append( "'" ).append( height ).append( "'" ); }
224 else { rtn.append( "null" ); }
225 rtn.append( "," );
226 if( width != null ) { rtn.append( "'" ).append( width ).append( "'" ); }
227 else { rtn.append( "null" ); }
228 rtn.append( "," );
229
230 String columnName = null; //4.2.4.0 2008/07/01
231 if( keys != null && keys.length > 0 ) {
232 rtn.append( "new Array(" );
233 addQuote( rtn, keys[0], false );
234 rtn.append( "," );
235 addQuote( rtn, vals[0], false );
236 for( int i = 1; i < keys.length; i++ ) {
237 rtn.append( "," );
238 addQuote( rtn, keys[i], false );
239 rtn.append( "," );
240 addQuote( rtn, vals[i], false );
241 }
242 rtn.append( ")," );
243 }
244 else {
245 ColumnTag outerColumn = (ColumnTag) findAncestorWithClass( this, ColumnTag.class );
246 columnName = ( outerColumn == null ) ? null : outerColumn.getName();
247 if( columnName != null ) {
248 rtn.append( "new Array('XNAME','" );
249 rtn.append( columnName );
250 rtn.append( "','XVALUE'," );
251 rtn.append( columnName );
252 rtn.append( ".value" );
253 rtn.append( ")," );
254 }
255 else {
256 rtn.append( "null," );
257 }
258 }
259 rtn.append( "" );
260
261 if( rtnKeys != null && rtnKeys.length > 0 ) {
262 rtn.append( "this,new Array(" );
263 addQuote( rtn, rtnKeys[0], useKey );
264 for( int i = 1; i < rtnKeys.length; i++ ) {
265 rtn.append( "," );
266 addQuote( rtn, rtnKeys[i], useKey );
267 }
268 rtn.append( ")" );
269 }
270 else if( columnName != null ) {
271 rtn.append( "this,new Array('" );
272 rtn.append( columnName );
273 rtn.append( "')" );
274 }
275 else {
276 rtn.append( "null,null" );
277 }
278
279 // 5.1.7.0 (2010/06/01) 引数ã«commandを追åŠ?
280 // 5.8.5.0 (2015/03/06) append追�
281 // rtn.append( ");" );
282 // rtn.append( ",'" ).append( command ).append( "');" );
283 rtn.append( ",'" ).append( command ).append( "'");
284 rtn.append( ",'" ).append( append ).append( "');" );
285
286 if( imgsrc == null ) {
287 set( "type" , "button" );
288 set( "body" , nval( getMsglbl(),DEF_BODY) );
289 set( "onClick", rtn.toString() );
290 set( "style" , nval( get( "style" ),DEF_STYLE) );
291 return XHTMLTag.button( getAttributes() ) ;
292 }
293 else {
294 set( "src" , imgsrc );
295 set( "title" , getMsglbl() );
296 set( "onClick", rtn.toString() );
297 set( "style" , get( "style" ) );
298 return XHTMLTag.img( getAttributes() ) ;
299 }
300 }
301
302 /**
303 * 引数 val ã®è¨å®šå?ã‚’è¨å®šã™ã‚‹ç°¡æ˜“メソãƒ?ƒ‰
304 *
305 * @param buf çµæžœã‚’æ?ç´ã™ã‚‹StringBuilderオブジェクãƒ?
306 * @param val è¨å®šå?
307 * @param useKey [true:KEY付ã/false:KEYç„¡ã—]
308 *
309 * @return (引数ã®ãƒãƒƒãƒ•ã‚¡ã¨åŒã˜ã‚ªãƒ–ジェクãƒ?
310 */
311 private StringBuilder addQuote( final StringBuilder buf, final String val, final boolean useKey ) {
312 if( useKey ) {
313 if( val != null && val.endsWith( ".value" ) ) {
314 buf.append( val.substring( 0,val.length()-6 ) ).append( "__{I}.value" );
315 }
316 else {
317 buf.append( "'" ).append( val ).append( "__{I}'" );
318 }
319 }
320 else {
321 if( val != null && val.endsWith( ".value" ) ) {
322 if( val.charAt(0) == '[' ) {
323 buf.append( val.substring( 1,val.length()-7 ) ).append( "__{I}.value" );
324 }
325 else {
326 buf.append( val );
327 }
328 }
329 else {
330 buf.append( "'" ).append( val ).append( "'" );
331 }
332 }
333 return buf ;
334 }
335
336 /**
337 * ç”»é¢?©?¤ã¨href ã‹ã‚‰ã€æŒ‡å®šã??µ?²?¬ã‚’作æ?ã—ã¾ã™ã?
338 */
339 private void makeGamenLink() {
340 if( gamenId == null || gamenId.length() == 0 ) { return ; }
341
342 GUIInfo guiInfo = getGUIInfo( gamenId ); // 4.0.0 (2005/01/31)
343 if( guiInfo == null ) { return ; } // 見ã¤ã‹ã‚‰ãªã??åˆã?ã€ã‚¢ã‚¯ã‚»ã‚¹ä¸å¯
344
345 String address = guiInfo.getRealAddress( get( "href" ) );
346 String url = getRequestParameter( address );
347 set( "href",url );
348
349 if( get( "title" ) == null ) {
350 set( "title","To:" + guiInfo.getLabel() );
351 }
352 }
353
354 /**
355 * ã€TAG】ã“ã®è¦ç´?‚’リンクã®å¯¾è±¡ã¨ã™ã‚‹ãŸã‚ã®åå‰ã‚’指定ã—ã¾ã™ã?
356 *
357 * @og.tag ã“ã?è¦ç´?‚’リンクã®å¯¾è±¡ã¨ã™ã‚‹ãŸã‚ã®åå‰ã‚’指定ã—ã¾ã™ã?
358 *
359 * @param name åå‰
360 */
361 public void setName( final String name ) {
362 set( "name",getRequestParameter( name ) );
363 }
364
365 /**
366 * ã€TAG】リンクをã¤ã‘ãŸã?‚«ãƒ©ãƒ?‚’æŒ?®šã—ã¾ã™ã?
367 *
368 * @og.tag
369 * ã“ã?カラãƒ?ã®TableModelã«å¯¾ã—ã¦ã€?ViewLink ã‚¿ã‚°ãŒå˜åœ¨ã™ã‚‹å ´åˆã?,
370 * リンクを張りã¾ã™ã?
371 *
372 * @param clm カラ�
373 */
374 public void setColumn( final String clm ) {
375 column = nval( getRequestParameter( clm ),column );
376 }
377
378 /**
379 * ã€TAG】画é¢ID属æ?を登録ã—ã¾ã™ã?
380 *
381 * @og.tag
382 * gamenId 属æ?ã¯ã€ç”»é¢IDã‚’ã‚ーã«ã€å®Ÿã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’求ã‚ã‚‹ã?ã«ä½¿ç”¨ã—ã¾ã™ã?
383 * ç”»é¢IDãŒæŒ‡å®šã•れãŸå ´åˆã?ã€å®Ÿã‚¢ãƒ‰ãƒ¬ã‚¹ã«å¤‰æ›ã™ã‚‹ã€‚指定ã•れãªã??åˆã?ã€?
384 * href 属æ?ã‚’ãã®ã¾ã¾ãƒªãƒ³ã‚¯æƒ??を作æ?ã—ã¾ã™ã?
385 * ç”»é¢IDを指定ã™ã‚‹å?åˆã? href ã¯ã€JSPファイルå?例ãˆã°ã€index.jsp ç?ã§ã™ã?
386 *
387 * @param id ç”»é¢ID
388 */
389 public void setGamenId( final String id ) {
390 gamenId = nval( getRequestParameter( id ),gamenId );
391 }
392
393 /**
394 * ã€TAG】ã?ãƒ??ã‚¢ãƒ??å…ˆã?URLを指定ã—ã¾ã?åˆæœŸå€¤:index.jsp)ã€?
395 *
396 * @og.tag
397 * 通常ã€gamenId を指定ã—ã¦ã?‚‹å ´åˆã?ã€ãれ以é™?index.jsp , result.jsp ãªã©)を指定ã—ã¾ã™ã?
398 * 通常ã®ãƒªãƒ³ã‚¯ã®å ´åˆã?GAMENID/href ã¨ã?†ã‚¢ãƒ‰ãƒ¬ã‚¹ã«åˆæ?ã•れã¾ã™ã?( GE0001/result.jsp ãªã© )
399 * (æ£ç¢ºã«ã¯ã€ç”»é¢IDã§ã¯ãªãã?対応ã™ã‚‹ç”»é¢ADDRESSを使用ã—ã¾ã™ã?)
400 * ãƒãƒƒãƒ—ã‚¢ãƒ??専用ã®ãƒªãƒ³ã‚¯ãªã®ã§ã€å?期å?ã¯ã€index.jsp ã§ã™ã?
401 *
402 * @param href ãƒãƒƒãƒ—ã‚¢ãƒ??å…ˆã?URL
403 */
404 public void setHref( final String href ) {
405 set( "href",nval( getRequestParameter( href ),this.href ) );
406 }
407
408 /**
409 * ã€TAG】ã?ãƒ??ã‚¢ãƒ??å…ˆã?æ–?—コードセãƒ?ƒˆã‚’指定ã—ã¾ã™ã?
410 *
411 * @og.tag ãƒãƒƒãƒ—ã‚¢ãƒ??å…ˆã?æ–?—コードセãƒ?ƒˆã‚’指定ã—ã¾ã™ã?
412 *
413 * @param charset æ–?—コードセãƒ?ƒˆ
414 */
415 public void setCharset( final String charset ) {
416 set( "charset",getRequestParameter( charset ) );
417 }
418
419 /**
420 * ã€TAG】ã?ãƒ??ã‚¢ãƒ??å…ˆã?表示ターゲãƒ?ƒˆã‚’指定ã—ã¾ã?åˆæœŸå€¤:CONTENTS)ã€?
421 *
422 * @og.tag ãƒãƒƒãƒ—ã‚¢ãƒ??å…ˆã?表示ターゲãƒ?ƒˆã‚’指定ã—ã¾ã™ã?
423 *
424 * @param target 表示ターゲãƒ?ƒˆ
425 */
426 public void setTarget( final String target ) {
427 set( "target",nval( getRequestParameter( target ),this.target ) );
428 }
429
430 /**
431 * ã€TAG】ã?ãƒ??ã‚¢ãƒ??å…ˆã«æ¸¡ã™å?力ã‚ーé…å?ã‚’CSVå½¢å¼ã§è¤?•°æŒ?®šã—ã¾ã™ã?
432 *
433 * @og.tag ãƒãƒƒãƒ—ã‚¢ãƒ??å…ˆã«æ¸¡ã™å?力ã‚ーé…å?を指定ã—ã¾ã™ã?
434 * åˆ?§£æ–¹æ³•ã?ã€CSV変数をå?ã«åˆ?§£ã—ã¦ã‹ã‚‰ã€getRequestParameter ã§å€¤ã‚’å–å¾—ã—ã¾ã™ã?
435 * ã“ã†ã—ãªã?¨ãƒ??タ自身ã«ã‚«ãƒ³ãƒžã‚’æŒã£ã¦ã?‚‹å ´åˆã«åˆ?§£ã‚’ミスる為ã§ã™ã?
436 *
437 * @param key 渡ã™å?力ã‚ーé…å?(CSVå½¢å¼?
438 */
439 public void setKeys( final String key ) {
440 keys = getCSVParameter( key );
441 }
442
443 /**
444 * ã€TAG】ã?ãƒ??ã‚¢ãƒ??å…ˆã«æ¸¡ã™å?é…å?ã‚’CSVå½¢å¼ã§è¤?•°æŒ?®šã—ã¾ã™ã?
445 *
446 * @og.tag ãƒãƒƒãƒ—ã‚¢ãƒ??å…ˆã«æ¸¡ã™å?é…å?を指定ã—ã¾ã™ã?
447 * åˆ?§£æ–¹æ³•ã?ã€CSV変数をå?ã«åˆ?§£ã—ã¦ã‹ã‚‰ã€getRequestParameter ã§å€¤ã‚’å–å¾—ã—ã¾ã™ã?
448 * ã“ã†ã—ãªã?¨ãƒ??タ自身ã«ã‚«ãƒ³ãƒžã‚’æŒã£ã¦ã?‚‹å ´åˆã«åˆ?§£ã‚’ミスる為ã§ã™ã?
449 *
450 * @param val 渡ã™å?é…å?(CSVå½¢å¼?
451 */
452 public void setVals( final String val ) {
453 vals = getCSVParameter( val );
454 }
455
456 /**
457 * ã€TAG】ã?ãƒ??ã‚¢ãƒ??先よりå—ã‘å–ã‚‹ã‚ーé…å?ã‚’CSVå½¢å¼ã§è¤?•°æŒ?®šã—ã¾ã™ã?
458 *
459 * @og.tag ãƒãƒƒãƒ—ã‚¢ãƒ??先よりå—ã‘å–ã‚‹ã‚ーé…å?を指定ã—ã¾ã™ã?
460 * åˆ?§£æ–¹æ³•ã?ã€CSV変数をå?ã«åˆ?§£ã—ã¦ã‹ã‚‰ã€getRequestParameter ã§å€¤ã‚’å–å¾—ã—ã¾ã™ã?
461 * ã“ã†ã—ãªã?¨ãƒ??タ自身ã«ã‚«ãƒ³ãƒžã‚’æŒã£ã¦ã?‚‹å ´åˆã«åˆ?§£ã‚’ミスる為ã§ã™ã?
462 *
463 * @param key å—ã‘å–ã‚‹ã‚ーé…å?(CSVå½¢å¼?
464 */
465 public void setRtnKeys( final String key ) {
466 rtnKeys = getCSVParameter( key );
467 }
468
469 /**
470 * ã€TAG】リンクを張ã‚?true or 1)/張らãªã?false or 0)ã®è¨å®šã‚’æŒ?®šã—ã¾ã?åˆæœŸå€¤:true)ã€?
471 *
472 * @og.tag
473 * リンクを張るå?åˆã?ã€?true"(ã¾ãŸã? "1") リンクを張らãªã?
474 * å ´åˆã?, "true以å¤?(ã¾ãŸã? "0")ã‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã?
475 * åˆæœŸå€¤ã¯ã€?"true"(リンクを張ã‚?ã§ã™ã?
476 * ã•らã«ã€[カラãƒ?] ã§ã€å‹•çš?«ã‚«ãƒ©ãƒ??値ã§ã€ãƒªãƒ³ã‚¯ã‚’張るã?張らãªã?‚’
477 * é¸ã¶äº‹ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã?値ã¯ã€?true"(ã¾ãŸã? "1") ã§ã€ã?ークã—ã¾ã™ã?
478 * ãŸã ã—ã?å˜ç‹¬ linkタグ時ã?使用ã§ãã¾ã›ã‚“ã€?
479 * 追è¨?3.5.2.0 (2003/10/20)?šmarkList属æ?ã«ã€å?ç?¯¾è±¡æ–?—å?郡を指定ã§ãã¾ã™ã?
480 * ã“れã«ã‚ˆã‚Šã€ãƒªãƒ³ã‚¯ã‚’å?ç?™ã‚‹ã‹ã©ã?‹ã®åˆ¤æ–ãŒã?true,1 以外ã«ã‚‚使用ã§ãるよã†ã«ãªã‚Šã¾ã—ãŸã€?
481 *
482 * @param flag リンクã®è¨å®š[true:リンクを張ã‚?ãれ以å¤?リンクを張らãªã„]
483 */
484 public void setOnMark( final String flag ) {
485 onMark = nval( getRequestParameter( flag ),onMark );
486 }
487
488 /**
489 * ã€TAG】å?ç?™ã‚‹ã?ークをã?"|"区åˆ?‚Šã®æ–?—å?ã§æŒ?®šã—ã¾ã™ã?
490 *
491 * @og.tag
492 * markListã§ä¸Žãˆã‚‰ã‚ŒãŸæ–‡å—å?ã«ã€onMarkæ–?—å?(大æ–??å°æ–‡å—ã?区別ã‚り)ã?
493 * å«ã¾ã‚Œã¦ã?‚Œã°ã€å?ç?—ã¾ã™ã?
494 * 例ãˆã°ã€?A","B","C" ã¨ã?†æ–?—å?ãŒã?onMark ã§æŒ?®šã•れãŸ
495 * å ´åˆã«å‡¦ç?™ã‚‹ã‚ˆã?«ã—ãŸã??åˆã?ã€?A|B|C" ã‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã?
496 * markList ã«ã¯ã€[カラãƒ?]æŒ?®šãŒå¯èƒ½ã§ã™ã?(ãŸã ã—ã?å˜ç‹¬ linkタグ時ã?除ã?
497 * åˆæœŸå€¤ã¯ã€?"true|TRUE|1"ã§ã™ã?
498 *
499 * @param list 処ç?™ã‚‹ã?ーク(indexOf ã«ã‚ˆã‚‹å«ã‚?å«ã¾ãªã?ˆ¤å®?
500 */
501 public void setMarkList( final String list ) {
502 markList = nval( getRequestParameter( list ),markList );
503 }
504
505 /**
506 * ã€TAG】ダイアãƒã‚°ã®ç¸¦å¹?‚’ãƒ”ã‚¯ã‚»ãƒ«æ•°ã§æŒ?®šã—ã¾ã™ã?
507 *
508 * @og.tag
509 * 縦å¹?‚’æŒ?®šã—ã¾ã™ã?å˜ä½ã‚‚å«ã‚ã¦å…¥åŠ›ã—ã¦ãã ã•ã„ã€?
510 * è¨å®šã—ãªã??åˆã?ã€ogPopup JavaScript ã®å†?ƒ¨åˆæœŸå€¤ãŒæŽ¡ç”¨ã•れã¾ã™ã?
511 *
512 * @og.rev 5.2.1.0 (2010/10/01) heightã€width ã«ã¯ã€?px" ãªã©ã®å˜ä½ã‚’付ã‘ã‚‹å‰æã§ã®å¯¾å¿?
513 *
514 * @param ht ãƒ?‚¤ã‚¢ãƒã‚°ã®ç¸¦å¹?ピクセル数)
515 */
516 public void setHeight( final String ht ) {
517 height = nval( getRequestParameter( ht ),height );
518 if( height != null && ! height.endsWith( "px" ) ) { height += "px"; } // 5.2.1.0 (2010/10/01)
519 }
520
521 /**
522 * ã€TAG】ダイアãƒã‚°ã®æ¨ªå¹?‚’ãƒ”ã‚¯ã‚»ãƒ«æ•°ã§æŒ?®šã—ã¾ã™ã?
523 *
524 * @og.tag
525 * 横å¹?‚’æŒ?®šã—ã¾ã™ã?å˜ä½ã‚‚å«ã‚ã¦å…¥åŠ›ã—ã¦ãã ã•ã„ã€?
526 * è¨å®šã—ãªã??åˆã?ã€ogPopup JavaScript ã®å†?ƒ¨åˆæœŸå€¤ãŒæŽ¡ç”¨ã•れã¾ã™ã?
527 *
528 * @og.rev 5.2.1.0 (2010/10/01) heightã€width ã«ã¯ã€?px" ãªã©ã®å˜ä½ã‚’付ã‘ã‚‹å‰æã§ã®å¯¾å¿?
529 *
530 * @param wh ãƒ?‚¤ã‚¢ãƒã‚°ã®æ¨ªå¹?ピクセル数)
531 */
532 public void setWidth( final String wh ) {
533 width = nval( getRequestParameter( wh ),width );
534 if( width != null && ! width.endsWith( "px" ) ) { width += "px"; } // 5.2.1.0 (2010/10/01)
535 }
536
537 /**
538 * ã€TAG】表示ã•ã›ã‚‹ç”»åƒã?URLを指定ã—ã¾ã™ã?
539 *
540 * @og.tag
541 * ã“ã?属æ?ã‚’è¨å®šã™ã‚‹ã¨ã€è?動的㫠イメージリンクã§ã® onClick属æ?ã§
542 * ãƒãƒƒãƒ—ã‚¢ãƒ??ã®èµ·å‹•ç”»é¢ã‚’作æ?ã—ã¾ã™ã?
543 * ã“ã?属æ?ãŒè¨å®šã•れã¦ã?ªã??åˆã?ã€button ã§ã®èµ·å‹•ã«ãªã‚Šã¾ã™ã?
544 *
545 * @param src ç”»åƒã?URL
546 */
547 public void setSrc( final String src ) {
548 imgsrc = nval( getRequestParameter( src ),imgsrc );
549 }
550
551 /**
552 * ã€TAGã€?通常使ã?¾ã›ã‚“)処ç??実行をæŒ?®šã™ã‚?command ã‚’è¨å®šã§ãã¾ã?åˆæœŸå€¤:NEW)ã€?
553 *
554 * @og.tag
555 * ã“ã“ã§æŒ?®šã•れãŸcommandã¯ã€ã?ãƒ??ã‚¢ãƒ??ç”»é¢ã®å¼•æ•°ã¨ã—ã¦æ¸¡ã•れã¾ã™ã?
556 * åˆæœŸå€¤ã¯ã€NEW ã§ã™ã?
557 *
558 * @og.rev 5.1.7.0 (2010/06/01) æ–°è¦ä½œæ?
559 *
560 * @param cmd コマン�
561 */
562 public void setCommand( final String cmd ) {
563 command = nval( getRequestParameter( cmd ),command );
564 }
565
566 /**
567 * ã€TAG】返り値をã‚ャレãƒ?ƒˆä½ç½®ã«è¿½è¨˜ã™ã‚?true)/ã—ãªã?false)ã®è¨å®šã‚’æŒ?®šã—ã¾ã?åˆæœŸå€¤:false)ã€?
568 *
569 * @og.tag
570 * ãƒãƒƒãƒ—ã‚¢ãƒ??ã‹ã‚‰ã®è¿”り値をã?å…??値ã¨ç½®æ›ã™ã‚‹ã?ã§ã¯ãªãã?ã‚ャレãƒ?ƒˆä½ç½®ã«æŒ¿å…¥ã™ã‚‹ã‹ã©ã?‹ã‚’指定ã—ã¾ã™ã?
571 *
572 * @og.rev 5.8.5.0 (2015/02/06)
573 *
574 * @param flg 返り値ã®ã‚ャレãƒ?ƒˆä½ç½®ã«è¿½è¨˜è¨[true:追è¨?ãれ以å¤?ç½®æ›]
575 */
576 public void setAppend( final String flg ) {
577 append = nval( getRequestParameter( flg ),append );
578 }
579
580 /**
581 * ã“ã?オブジェクトã?æ–?—å?表ç¾ã‚’è¿”ã—ã¾ã™ã?
582 * 基本çš?«ãƒ?ƒãƒ?‚°ç›®çš?«ä½¿ç”¨ã—ã¾ã™ã?
583 *
584 * @return ã“ã?ã‚¯ãƒ©ã‚¹ã®æ–?—å?表ç¾
585 */
586 @Override
587 public String toString() {
588 return org.opengion.fukurou.util.ToString.title( this.getClass().getName() )
589 .println( "VERSION" ,VERSION )
590 .println( "column" ,column )
591 .println( "gamenId" ,gamenId )
592 .println( "href" ,href )
593 .println( "target" ,target )
594 .println( "onMark" ,onMark )
595 .println( "markList" ,markList )
596 .println( "height" ,height )
597 .println( "width" ,width )
598 .println( "keys" ,keys )
599 .println( "vals" ,vals )
600 .println( "rtnKeys" ,rtnKeys )
601 .println( "Other..." ,getAttributes().getAttribute() )
602 .fixForm().toString()
603 + HybsSystem.CR
604 + super.toString() ;
605 }
606 }