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.HybsSystem;
019 import org.opengion.hayabusa.resource.GUIInfo;
020 import org.opengion.hayabusa.resource.RoleMode ;
021 import org.opengion.hayabusa.db.DBLastSql;
022 import org.opengion.fukurou.util.Attributes;
023 import org.opengion.fukurou.util.XHTMLTag;
024 import org.opengion.fukurou.util.StringUtil ;
025
026 import static org.opengion.fukurou.util.StringUtil.nval ;
027
028 /**
029 * ファイルア??ロー??ンロードリンクを作?するタグで?通常は result_info.jsp に?み)?
030 *
031 * 画面検索した結果を??ンロードしたり、ア??ロードする機?は、画面リソースの
032 * ロール制御で管?て?す?
033 * ただし??ォルトで、以下?制限が掛かって?す?
034 *
035 * ファイル?ンロー?
036 * ・command="NEW|RENEW|FIRST|LAST|PREV|NEXT|VIEW|RESET" のみ
037 * ファイルア??ロー?
038 * ・command="COPY|INSERT" のみ
039 *
040 * 5.7.8.1 (2014/07/18)
041 * addDownCmnd と、addUpldCmnd を指定すれ?、ダウンロード?ア??ロードできる
042 * command を増やすことが可能です?
043 *
044 * また?typeDownload="true" にするとDownload 処?行う為の前??実施します?
045 * Download 処?行うには、指定?画面(呼び出し?)と、抜き?した時?
046 * DBTableModel が??して?か判定します?
047 * また?DBTableModel が存在しな??また?、不備な場?オーバ?フロー)は?
048 * ?SQLを実行する?があり、そもそも?抜?処?出来な?態では?
049 * エラーを返す?があります?
050 * それら???のDownload 処?行うかど?を指定します?
051 * true の場合?session の HybsSystem.DB_LAST_SQL_KEY に格納された
052 * DBLastSql オブジェクトを取得し、scope ?request また?、overflow ?
053 * true の場合に、BODY部を実行します?(通常、queryタグを記述します?)
054 * query の出力?は、scope ?request にします?
055 * それ以外?、tableId から取り出した DBTableModel を?scope = "request"
056 * に(アドレスのみ)コピ?します?
057 * writeTable タグでは、scope = "request" から、DBTableModel を取り?します?
058
059 * @og.formSample
060 * ●形式:?ユーザーが直接?込?とはありません?
061 * ●body?あ?EVAL_BODY_BUFFERED:BODYを評価し?{@XXXX} を解析しま?
062 *
063 * ●Tag定義??
064 * <og:fileUD
065 * command 【TAG】command を指定しま?
066 * downloadImg 【TAG】ダウンロード時のアイコンを指定しま?初期値:"{@SYS.JSP}/image/fileDownload.gif")
067 * downloadJsp 【TAG】ダウンロード時の呼び出しJSPを指定しま?初期値:"{@SYS.JSP}/common/fileDownload.jsp")
068 * uploadImg 【TAG】ア??ロード時のアイコンを指定しま?初期値:"{@SYS.JSP}/image/fileUpload.gif")
069 * uploadJsp 【TAG】ア??ロード時の呼び出しJSPを指定しま?初期値:"{@SYS.JSP}/common/fileUpload.jsp")
070 * imgWidth 【TAG】アイコン?イズ(px)を指定しま?初期値:20px)
071 * imgHeight 【TAG】アイコン高さサイズ(px)を指定しま?初期値:20px)
072 * filename 【TAG】ダウンロード時ファイル名を?しま?初期値:"{@GUI.LABEL}.xls")
073 * addDownCmnd 【TAG】ダウンロード時のコマンドを追?定できま?初期値:null)
074 * addUpldCmnd 【TAG】ア??ロード時のコマンドを追?定できま?初期値:null)
075 * roles 【TAG】ロールズをセ?しま?
076 * target 【TAG】ダウンロード文書を表示させるフレー??また?ウィンドウの名前を指定しま?
077 * errorMsg 【TAG】ダウンロード?来な??合?エラーメ?ージIDを指定しま?初期値:ERR0028)
078 * typeDownload 【TAG】Download 処?行うかど?を指定しま?初期値:false)
079 * useEditLink 【TAG】編?ンク自体を出すかど?ど?(初期値:true)
080 * editImg 【TAG】編?イコンを指定しま?初期値:"{@SYS.JSP}/image/edit.png")
081 * clmEdit 【TAG】編?にカラ??ブを表示するかど?(初期値:true)
082 * debug 【TAG】デバッグ??を?力するかど?[true/false]を指定しま?初期値:false)
083 * > ... Body ...
084 * </og:fileUD>
085 *
086 * ●使用?
087 * <og:fileUD command="{@command}" />
088 *
089 * <og:fileUD
090 * command = command設?(?ンロー?"NEW|RENEW|FIRST|LAST|PREV|NEXT|VIEW" ? ア??ロー?"COPY|INSERT")
091 * [ downloadImg ] = "{@SYS.JSP}/image/fileDownload.gif" ?ンロード時のアイコン
092 * [ downloadJsp ] = "{@SYS.JSP}/common/fileDownload.jsp" ?ンロード時の呼び出しJSP
093 * [ uploadImg ] = "{@SYS.JSP}/image/fileUpload.gif" ア??ロード時のアイコン
094 * [ uploadJsp ] = "{@SYS.JSP}/common/filePopup.jsp" ア??ロード時の呼び出しJSP
095 * [ imgWidth ] = "20px" アイコン?イズ(px)
096 * [ imgHeight ] = "20px" アイコン高さサイズ(px)
097 * [ filename ] = "{@GUI.LABEL}.xls" ?ンロード時ファイル?
098 * [ roles ] = "GE|DOC" アクセスロールズ
099 * [ target ] = "_blank" ?ンロードファイルを開くターゲ?
100 * [ errorMsg ] = "ERR0042" エラーメ?ージID
101 * [ typeDownload] = "false/true" Download 処?行うかど?(初期値:false)
102 * />
103 *
104 * @og.group ファイルア??ロー??ンロー?
105 *
106 * @og.rev 4.3.0.0 (2008/07/04) 新規追?
107 * @og.rev 5.7.4.1 (2014/03/15) エラーメ?ージ変更
108 *
109 * @version 4.0
110 * @author Kazuhiko Hasegawa
111 * @since JDK5.0,
112 */
113 public class FileUDTag extends CommonTagSupport {
114 //* こ?プログラ??VERSION??を設定します? {@value} */
115 private static final String VERSION = "5.7.8.1 (2014/07/18)" ;
116
117 private static final long serialVersionUID = 578120140718L ;
118
119 private String sysJsp = HybsSystem.sys( "JSP" );
120
121 private String command = null; // ?ンロー?"NEW|RENEW" 、ア??ロー?"COPY|INSERT"
122 private String downloadImg = sysJsp + "/image/fileDownload.gif"; // ?ンロード時のアイコン
123 private String downloadJsp = sysJsp + "/common/fileDownload.jsp"; // ?ンロード時の呼び出しJSP
124 private String uploadImg = sysJsp + "/image/fileUpload.gif"; // ア??ロード時のアイコン
125 private String uploadJsp = sysJsp + "/common/filePopup.jsp"; // ア??ロード時の呼び出しJSP
126 private String imgWidth = "20px"; // アイコン?イズ(px)
127 private String imgHeight = "20px"; // アイコン高さサイズ(px)
128 private String filename = null; // ?ンロード時ファイル?"{@GUI.LABEL}.xls")
129 private String roles = null; // アクセスロールズ
130 private String target = null; // ?ンロードファイルを開くターゲ?
131 private String errorMsg = "ERR0042"; // 出力対象??タが見つかりませんでした。?度検索して下さ?? 5.7.4.1 (2014/03/15)
132 private boolean isError = false;
133 private boolean typeDownload = false; // Download 処?行うかど?(初期値:false)
134 private boolean isEdit = true; // 5.6.0.2 (2013/01/19) ロールのisEditとほぼ同等?clmEdit用?
135 private boolean useEditLink = true; // 5.7.5.0 (2014/04/04) 編?ンク自体を出すかど?ど?(初期値:true)
136
137 private String addDownCmnd = null; // 5.7.8.1 (2014/07/18) ?ンロード時のコマンドを追?
138 private String addUpldCmnd = null; // 5.7.8.1 (2014/07/18) ア??ロード時のコマンドを追?
139
140 private static final String EDIT_GAMENID= "14_EDIT"; // 編?面の画面ID
141 private String editImg = sysJsp + "/image/edit.png"; // 編?のアイコン
142
143 /**
144 * Taglibの開始タグが見つかったときに処??doStartTag() ?オーバ?ライドします?
145 *
146 * @og.rev 5.1.6.0 (2010/05/01) 画面?並べ替え対?
147 *
148 * @return 後続????(SKIP_BODY)
149 */
150 @Override
151 public int doStartTag() {
152
153 if( typeDownload ) {
154 DBLastSql lastSql = (DBLastSql)getSessionAttribute( HybsSystem.DB_LAST_SQL_KEY );
155 if( lastSql != null ) {
156 String guikey = getRequest().getParameter( "gamenId" );
157 if( lastSql.isGuiMatch( guikey ) ) {
158 // view タグで仕込んだ clmNames を?Request 変数に設定します?
159 setRequestAttribute( "DB.CLM_NAMES" , lastSql.getClmNames() );
160 // 5.1.6.0 (2010/05/01) 画面?並べ替え対?
161 setRequestAttribute( "DB.VIEW_CLM_NAMES" , lastSql.getViewClmNames() );
162 setRequestAttribute( "DB.VIEW_EDITABLE" , Boolean.toString( lastSql.isViewEditable() ) );
163
164 // if( lastSql.isRequest() || lastSql.isOverflow() ) {
165 if( lastSql.isRequest() ) {
166 // 5.1.6.0 (2010/05/01)
167 String sql = getUserInfo( "LASTSQL" );
168 if( sql != null ) {
169 return EVAL_BODY_BUFFERED ; // Body を評価する? extends BodyTagSupport ?
170 }
171 }
172 String tableId = lastSql.getTableId();
173 setRequestAttribute( HybsSystem.TBL_MDL_KEY, getSessionAttribute( tableId ) );
174 return SKIP_BODY ; // Body を評価しな?
175 }
176 }
177
178 // 処?実行できな??合?エラーを?力します?
179 jspPrint( getResource().getLabel( errorMsg ) );
180 isError = true;
181 }
182
183 return SKIP_BODY ; // Body を評価しな?
184 }
185
186 /**
187 * Taglibの終?グが見つかったときに処??doEndTag() ?オーバ?ライドします?
188 *
189 * @og.rev 4.3.0.1 (2008/08/11) callBack パラメータの設定漏れ修正、引数から見直?
190 * @og.rev 5.1.6.0 (2010/05/01) 帳票画面定義機?対?
191 * @og.rev 5.1.7.0 (2010/06/01) 進??戻る?タンで?xcel出力?タンを??
192 * @og.rev 5.3.6.0 (2011/06/01) Edit機?見直?
193 * @og.rev 5.3.7.0 (2011/07/01) Excel取込で画面IDとアドレスが異なる?合にエラーとなるバグを修正
194 * @og.rev 5.3.7.0 (2011/07/01) 編?面をリサイズできるように対応します?
195 * @og.rev 5.3.7.0 (2011/07/01) PL/SQLを利用した検索でファイル?ンロードが出来るよ?対応します?
196 * @og.rev 5.4.2.0 (2011/12/01) 画面リソースで画面編??のON/OFFを設定できるようにする?
197 * @og.rev 5.5.2.4 (2012/05/16) nullに対する冗長な比?
198 * @og.rev 5.5.5.2 (2012/08/20) 画面リソースのoモード対?
199 * @og.rev 5.5.6.2 (2012/09/24) makeTagのtarget対?
200 * @og.rev 5.6.0.2 (2013/01/19) editモード?isEditコントロール対?
201 * @og.rev 5.7.5.0 (2014/04/04) 編?ンク自体を出すかど?ど?(初期値:true)
202 * @og.rev 5.7.8.1 (2014/07/18) command="RESET" 時に、ダウンロードリンクを表示
203 * @og.rev 5.7.8.1 (2014/07/18) addDownCmnd , addUpldCmndを追?
204 *
205 * @return 後続????
206 */
207 @Override
208 public int doEndTag() {
209 debugPrint();
210
211 if( isError ) { return SKIP_PAGE ; } // ペ?ジの残りの処?行わな??
212 if( typeDownload ) { return EVAL_PAGE ; } // ペ?ジの残りを評価する?
213
214 boolean isDownload ;
215 // 5.7.8.1 (2014/07/18) command="RESET" 時に、ダウンロードリンクを表示
216 if( "NEW".equals( command ) || "RENEW".equals( command )
217 || "FIRST".equals( command ) || "LAST".equals( command )
218 || "PREV".equals( command ) || "NEXT".equals( command )
219 || "VIEW".equals( command ) || "RESET".equals( command ) ) {
220 isDownload = true;
221 }
222 else if( "COPY".equals( command ) || "INSERT".equals( command ) ) {
223 isDownload = false;
224 }
225 // 5.7.8.1 (2014/07/18) addDownCmnd , addUpldCmndを追?
226 else if( addDownCmnd != null && addDownCmnd.equals( command ) ) {
227 isDownload = true;
228 }
229 else if( addUpldCmnd != null && addUpldCmnd.equals( command ) ) {
230 isDownload = false;
231 }
232 else {
233 return EVAL_PAGE ;
234 }
235
236 byte bitMode ;
237 if( roles != null ) {
238 RoleMode roleMode = RoleMode.newInstance( roles );
239 RoleMode userRoleMode = getUser().getRoleMode();
240 bitMode = userRoleMode.getAccessBitMode( roleMode );
241 }
242 else {
243 GUIInfo guiInfo = (GUIInfo)getSessionAttribute( HybsSystem.GUIINFO_KEY );
244 bitMode = guiInfo.getBitMode();
245 }
246
247 if( filename == null ) {
248 filename = getGUIInfoAttri( "LABEL" ) + ".xls" ;
249 }
250 String guikey = getGUIInfoAttri( "KEY" ); // 4.3.0.1 (2008/08/11)
251 if( isDownload ) {
252 if( RoleMode.isDownload( bitMode ) ) {
253 // 4.3.0.1 (2008/08/11) callBack パラメータの設定漏れ修正、引数から見直?
254 // <og:link href="{@SYS.JSP}/common/fileDownload.jsp" target="_blank" useGamenId="false"
255 // keys="filename,h_clms" vals="{@GUI.LABEL}.xls,{@h_clms}" >
256
257 // 5.3.7.0 (2011/07/01) PL/SQLを利用した検索でファイル?ンロードが出来るよ?対応します?
258 String href = downloadJsp + "?command=RENEW&gamenId=" + guikey + "&GAMENID=" + guikey + "&filename=" + StringUtil.urlEncode( filename ) ;
259
260 jspPrint( makeTag( downloadImg,href,"Download File", target ) ); // 5.5.6.2 (2012/09/24)
261
262 // 5.1.6.0 (2010/05/01) 帳票画面定義機?対?
263 // 5.3.6.0 (2011/06/01) Edit機?見直?
264 GUIInfo editGui = getUser().getGUIInfo( EDIT_GAMENID );
265 // 5.7.5.0 (2014/04/04) 編?ンク自体を出すかど?ど?(初期値:true)
266 if( editGui != null && useEditLink ) {
267 String hrefEdit = sysJsp + "/" + editGui.getAddress() + "/"
268 + "?command=NEW&gamenId=" + guikey + "&GAMENID=" + guikey;
269
270 String editName = getRequestValue( "editName" );
271 // 5.5.2.4 (2012/05/16) nullに対する冗長な比?
272 if( editName != null ) {
273 hrefEdit += "&editName=" + editName;
274 }
275
276 // 5.4.2.0 (2011/12/01) 画面リソースで画面編??のON/OFFを設定できるようにする?
277 if( RoleMode.isEdit( bitMode ) && isEdit ) { // 5.6.0.2(2013/01/09)
278 hrefEdit += "&edit=true";
279 }
280
281 // 5.5.5.2 (2012/08/10) 画面リソースで、画面編??の制限を行えるよ?する
282 if( RoleMode.isFullEdit( bitMode ) ) {
283 hrefEdit += "&fullEdit=true";
284 }
285 else{
286 hrefEdit += "&fullEdit=false";
287 }
288
289 // 5.3.7.0 (2011/07/01) 編?面をリサイズできるように対応します?
290 hrefEdit = "javascript:ogOpen('" + hrefEdit + "',null,null,'width=800px,height=330px,top=350,left=100,resizable=yes',false);";
291 jspPrint( makeTag (editImg,hrefEdit,"Edit",null) ); // 5.5.6.2 (2012/09/24)
292 }
293 }
294 }
295 else {
296 if( RoleMode.isUpload( bitMode ) ) {
297 // 4.3.0.1 (2008/08/11) callBack パラメータの設定漏れ修正、引数から見直?
298 // <og:link href="{@SYS.JSP}/common/filePopup.jsp" keys="callBack" vals="{@GUI.KEY}/{@SESSION.JSPID}" >
299
300 String jspId = (String)getSessionAttribute( "JSPID" );
301 // 5.3.7.0 (2011/07/01) Excel取込で画面IDとアドレスが異なる?合にエラーとなるバグを修正
302 String callBack = getGUIInfoAttri( "ADDRESS" ) + "/" + jspId + "?GAMENID=" + guikey;
303 callBack = StringUtil.urlEncode( callBack );
304 String href = uploadJsp + "?callBack=" + callBack;
305
306 jspPrint( makeTag( uploadImg,href,"Upload File",target ) ); // 5.5.6.2 (2012/09/24)
307 }
308 }
309
310 return EVAL_PAGE ;
311 }
312
313 /**
314 * タグリブオブジェクトをリリースします?
315 * キャ?ュされて再利用される?で、フィールド?初期設定を行います?
316 *
317 * @og.rev 5.7.4.1 (2014/03/15) エラーメ?ージ変更
318 * @og.rev 5.7.5.0 (2014/04/04) useEditLink 追?
319 * @og.rev 5.7.8.1 (2014/07/18) addDownCmnd,addUpldCmnd 追?
320 */
321 @Override
322 protected void release2() {
323 super.release2();
324 sysJsp = HybsSystem.sys( "JSP" );
325 command = null; // ?ンロー?"NEW|RENEW|FIRST|LAST|PREV|NEXT|VIEW|RESET" 、ア??ロー?"COPY|INSERT"
326 downloadImg = sysJsp + "/image/fileDownload.gif"; // ?ンロード時のアイコン
327 downloadJsp = sysJsp + "/common/fileDownload.jsp"; // ?ンロード時の呼び出しJSP
328 uploadImg = sysJsp + "/image/fileUpload.gif"; // ア??ロード時のアイコン
329 uploadJsp = sysJsp + "/common/filePopup.jsp"; // ア??ロード時の呼び出しJSP
330 imgWidth = "20px"; // アイコン?イズ(px)
331 imgHeight = "20px"; // アイコン高さサイズ(px)
332 filename = null; // ?ンロード時ファイル?"{@GUI.LABEL}.xls")
333 roles = null; // アクセスロールズ
334 target = null; // ?ンロードファイルを開くターゲ?
335 errorMsg = "ERR0042"; // 出力対象??タが見つかりませんでした。?度検索して下さ?? 5.7.4.0 (2014/03/15)
336 typeDownload = false; // Download 処?行うかど?(初期値:false)
337 isError = false;
338 editImg = sysJsp + "/image/edit.png"; // 編?のアイコン
339 isEdit = true; // 5.6.0.2 (2013/01/19)
340 useEditLink = true; // 5.7.5.0 (2014/04/04) 追?
341 addDownCmnd = null; // 5.7.8.1 (2014/07/18) ?ンロード時のコマンドを追?
342 addUpldCmnd = null; // 5.7.8.1 (2014/07/18) ア??ロード時のコマンドを追?
343 }
344
345 /**
346 * リンクを作?します?
347 *
348 * @og.rev 4.3.0.1 (2008/08/11) callBack パラメータの設定漏れ修正、引数から見直?
349 * @og.rev 5.5.6.2 (2012/09/24) tgt引数追?
350 *
351 * @param imgsrc イメージソース
352 * @param href リンクのURL
353 * @param alt イメージの説明文書
354 * @param tgt HTMLのtarget
355 *
356 * @return リンク??
357 */
358 private String makeTag( final String imgsrc, final String href, final String alt, final String tgt ) { // 5.5.6.2 (2012/09/24)
359 // linkのBODY部にセ?するイメージタグの作?
360 Attributes imgAttri = new Attributes();
361 imgAttri.set( "width" , imgWidth );
362 imgAttri.set( "height" , imgHeight );
363 imgAttri.set( "src" , imgsrc );
364 imgAttri.set( "alt" , alt );
365
366 String img = XHTMLTag.img( imgAttri );
367
368 // 4.3.0.1 (2008/08/11) callBack パラメータの設定漏れ修正、引数から見直?
369 // linkタグの作?
370 Attributes linkAttri = new Attributes();
371 linkAttri.set( "href" , href );
372 linkAttri.set( "body" , img );
373 linkAttri.set( "target" , tgt ); // 5.5.6.2 (2012/09/24)
374
375 return XHTMLTag.link( linkAttri );
376 }
377
378 /**
379 * 【TAG】command を指定します?
380 *
381 * @og.tag
382 * command を指定します?
383 * ?ンロード??NEW|RENEW|FIRST|LAST|PREV|NEXT|VIEW|RESET" のみ有効です?
384 * ア??ロード??COPY|INSERT" のみ有効です?
385 * それ以外?コマンドでは、アイコンは表示されません?
386 * 例えば、NEXT/PREV など?
387 *
388 * @param cmd コマンド[NEW/RENEW/FIRST/LAST/PREV/NEXT/VIEW/RESET/COPY/INSERT]
389 * @see #setAddDownCmnd( String )
390 * @see #setAddUpldCmnd( String )
391 * @see #setCommand( String )
392 */
393 public void setCommand( final String cmd ) {
394 command = nval( getRequestParameter( cmd ),command );
395 }
396
397 /**
398 * 【TAG】ダウンロード時のアイコンを指定しま?初期値:"{@SYS.JSP}/image/fileDownload.gif")?
399 *
400 * @og.tag
401 * ?ンロード時に表示されるアイコンを指定します?
402 * 初期値:"{@SYS.JSP}/image/fileDownload.gif" です?
403 *
404 * @param img ?ンロード時のアイコン
405 */
406 public void setDownloadImg( final String img ) {
407 downloadImg = nval( getRequestParameter( img ),downloadImg );
408 }
409
410 /**
411 * 【TAG】ダウンロード時の呼び出しJSPを指定しま?初期値:"{@SYS.JSP}/common/fileDownload.jsp")?
412 *
413 * @og.tag
414 * ?ンロード時に呼び出されるJSPファイル名を?します?
415 * 初期値:"{@SYS.JSP}/common/fileDownload.jsp" です?
416 *
417 * @param file ?ンロード時の呼び出しJSP
418 */
419 public void setDownloadJsp( final String file ) {
420 downloadJsp = nval( getRequestParameter( file ),downloadJsp );
421 }
422
423 /**
424 * 【TAG】ア??ロード時のアイコンを指定しま?初期値:"{@SYS.JSP}/image/fileUpload.gif")?
425 *
426 * @og.tag
427 * ア??ロード時に表示されるアイコンを指定します?
428 * 初期値:"{@SYS.JSP}/image/fileUpload.gif" です?
429 *
430 * @param img ア??ロード時のアイコン
431 */
432 public void setUploadImg( final String img ) {
433 uploadImg = nval( getRequestParameter( img ),uploadImg );
434 }
435
436 /**
437 * 【TAG】ア??ロード時の呼び出しJSPを指定しま?初期値:"{@SYS.JSP}/common/fileUpload.jsp")?
438 *
439 * @og.tag
440 * ア??ロード時に呼び出されるJSPファイル名を?します?
441 * 初期値:"{@SYS.JSP}/common/fileUpload.jsp" です?
442 *
443 * @param file ア??ロード時の呼び出しJSP
444 */
445 public void setUploadJsp( final String file ) {
446 uploadJsp = nval( getRequestParameter( file ),uploadJsp );
447 }
448
449 /**
450 * 【TAG】アイコン?イズ(px)を指定しま?初期値:20px)?
451 *
452 * @og.tag
453 * ア??ロー??ンロード?アイコンを表示する際??イズ(px)を指定します?
454 * ファイルサイズは、ア??ロー??ンロード?通です?
455 * 初期値は?0px です?
456 *
457 * @param width アイコン?イズ(px)
458 */
459 public void setImgWidth( final String width ) {
460 imgWidth = nval( getRequestParameter( width ),imgWidth );
461 }
462
463 /**
464 * 【TAG】アイコン高さサイズ(px)を指定しま?初期値:20px)?
465 *
466 * @og.tag
467 * ア??ロー??ンロード?アイコンを表示する際?高さサイズ(px)を指定します?
468 * ファイルサイズは、ア??ロー??ンロード?通です?
469 * 初期値は?0px です?
470 *
471 * @param height アイコン高さサイズ(px)
472 */
473 public void setImgHeight( final String height ) {
474 imgHeight = nval( getRequestParameter( height ),imgHeight );
475 }
476
477 /**
478 * 【TAG】ダウンロード時ファイル名を?しま?初期値:"{@GUI.LABEL}.xls")?
479 *
480 * @og.tag
481 * ?ンロード時のファイル名を?しま?
482 * 通常は、画面のラベル(?対??XLS拡張子です?
483 * 初期値は?{@GUI.LABEL}.xls" です?
484 *
485 * @param file ?ンロード時ファイル?"{@GUI.LABEL}.xls")
486 */
487 public void setFilename( final String file ) {
488 filename = nval( getRequestParameter( file ),filename );
489 }
490
491 /**
492 * 【TAG】ロールズをセ?します?
493 *
494 * @og.tag
495 * ここで?したロールを?に、ユーザー毎?アクセス許可がチェ?されます?
496 * アクセス許可されな?、表示されません?
497 * こ?ロールを指定しな??合?、画面のロールが使用されます?
498 *
499 * @param rls パラメータ
500 */
501 public void setRoles( final String rls ) {
502 roles = nval( getRequestParameter( rls ),roles );
503 }
504
505 /**
506 * 【TAG】ダウンロード文書を表示させるフレー??また?ウィンドウの名前を指定します?
507 *
508 * @og.tag フレー?(ターゲ?属?)を設定します?
509 *
510 * @param flag ?ンロード文書のフレー?(ターゲ?属?)
511 */
512 public void setTarget( final String flag ) {
513 target = nval( getRequestParameter( flag ),target );
514 }
515
516 /**
517 * 【TAG】Download 処?行うかど?を指定しま?初期値:false)?
518 *
519 * @og.tag
520 * Download 処?行うには、指定?画面(呼び出し?)と、抜き?した時?
521 * DBTableModel が??して?か判定します?
522 * また?DBTableModel が存在しな??また?、不備な場?オーバ?フロー)は?
523 * ?SQLを実行する?があり、そもそも?抜?処?出来な?態では?
524 * エラーを返す?があります?
525 * それら???のDownload 処?行うかど?を指定します?
526 * true の場合?session の HybsSystem.DB_LAST_SQL_KEY に格納された
527 * DBLastSql オブジェクトを取得し、scope ?request また?、overflow ?
528 * true の場合に、BODY部を実行します?(通常、queryタグを記述します?)
529 * query の出力?は、scope ?request にします?
530 * それ以外?、tableId から取り出した DBTableModel を?scope = "request"
531 * に(アドレスのみ)コピ?します?
532 * writeTable タグでは、scope = "request" から、DBTableModel を取り?します?
533 *
534 * 初期値は、false(抜き出しでは無くリンク作?) です?
535 *
536 * @param type Download 処?行うかど?(初期値:false)
537 */
538 public void setTypeDownload( final String type ) {
539 typeDownload = nval( getRequestParameter( type ),typeDownload );
540 }
541
542 /**
543 * 【TAG】ダウンロード?来な??合?エラーメ?ージIDを指定しま?初期値:ERR0042)?
544 *
545 * @og.tag
546 * DBTableModel が??に作?された画面と、メモリ中の DBLastSql オブジェクトが
547 * 管?て???が異なる?合?、ダウンロード?来ません?
548 * 同様に、DBLastSql オブジェク?自身が作?されて???合も出来ません?
549 * そ?ようなケースに表示するエラーメ?ージのメ?ージIDを指定します?
550 * 引数は、指定できません?
551 * 初期値は、?ERR0042??力対象??タが見つかりませんでした。?度検索して下さ???です?
552 *
553 * @param msg ?ンロード文書のフレー?(ターゲ?属?)
554 */
555 public void setErrorMsg( final String msg ) {
556 errorMsg = nval( getRequestParameter( msg ),errorMsg );
557 }
558
559 /**
560 * 【TAG】編?イコンを指定しま?初期値:"{@SYS.JSP}/image/edit.png")?
561 *
562 * @og.tag
563 * 編?イコンを指定します?
564 * 初期値:"{@SYS.JSP}/image/edit.png" です?
565 *
566 * @og.rev 5.1.6.0 (2010/05/01) 新規追?
567 *
568 * @param img ア??ロード時のアイコン
569 */
570 public void setEditImg( final String img ) {
571 editImg = nval( getRequestParameter( img ),editImg );
572 }
573
574 /**
575 * 【TAG】Edit画面でカラ??ブを出すかど?(初期値?true)
576 *
577 * @og.tag
578 * falseを指定するとカラ??ブを出さな??
579 *
580 * @param type カラ??ブを出すかど?(初期値:true)
581 */
582 public void setClmEdit( final String type ) {
583 isEdit = nval( getRequestParameter( type ),isEdit );
584 }
585
586 /**
587 * 【TAG】Edit画面でカラ??ンクを?力するかど?(初期値?true)
588 *
589 * @og.tag
590 * falseを指定するとカラ??ンクを?さな??
591 * 従来は、カラ??面の??【表示?設定?タブを表示しな?けでした?
592 * こ?設定?、RWMODE を? ##d , ##u , ##f の場合にも同様?設定が可能です?
593 * カラ??ンク自体を出さな??は、現時点ではリソース設定できな?め?
594 * タグのパラメータとして?できるようにします?
595 * 基本?は、このパラメータはほとんど使われて??ズなので?
596 * 機?を置き換えます?
597 * 初期値は、カラ??ンクを?力す?=true)です?
598 *
599 * @og.rev 5.7.5.0 (2014/04/04) 新規追?
600 *
601 * @param flag カラ??ンクを?力するかど?(初期値:true)
602 * @see org.opengion.hayabusa.taglib.QueryButtonTag#setUseEditMenu(String)
603 */
604 public void setUseEditLink( final String flag ) {
605 useEditLink = nval( getRequestParameter( flag ),useEditLink );
606 }
607
608 /**
609 * 【TAG】ダウンロード時のコマンドを追?定できま?初期値:null)
610 *
611 * @og.tag
612 * ?ンロードリンクが表示され?command は?
613 * "NEW|RENEW|FIRST|LAST|PREV|NEXT|VIEW|RESET" のみです?
614 * これ以外? command で、ダウンロードリンクを表示させたい場合??
615 * こ?、addDownCmnd に、記述します?
616 * 初期値は、null(追?マンド?な?です?
617 *
618 * @og.rev 5.7.8.1 (2014/07/18) 新規追?
619 *
620 * @param cmd ?ンロード時のコマンドを追??
621 * @see #setCommand( String )
622 */
623 public void setAddDownCmnd( final String cmd ) {
624 addDownCmnd = nval( getRequestParameter( cmd ),addDownCmnd );
625 }
626
627 /**
628 * 【TAG】ア??ロード時のコマンドを追?定できま?初期値:null)
629 *
630 * @og.tag
631 * ア??ロードリンクが表示され?command は?COPY|INSERT" のみです?
632 * これ以外? command で、ア??ロードリンクを表示させたい場合??
633 * こ?、addUpldCmnd に、記述します?
634 * 初期値は、null(追?マンド?な?です?
635 *
636 * @og.rev 5.7.8.1 (2014/07/18) 新規追?
637 *
638 * @param cmd ア??ロード時のコマンドを追??
639 * @see #setCommand( String )
640 */
641 public void setAddUpldCmnd( final String cmd ) {
642 addUpldCmnd = nval( getRequestParameter( cmd ),addUpldCmnd );
643 }
644
645 /**
646 * こ?オブジェクト???表現を返します?
647 * 基本???目?使用します?
648 *
649 * @return こ?クラスの??表現
650 */
651 @Override
652 public String toString() {
653 return org.opengion.fukurou.util.ToString.title( this.getClass().getName() )
654 .println( "VERSION" ,VERSION )
655 .println( "command" ,command )
656 .println( "downloadImg" ,downloadImg )
657 .println( "downloadJsp" ,downloadJsp )
658 .println( "uploadImg" ,uploadImg )
659 .println( "uploadJsp" ,uploadJsp )
660 .println( "imgWidth" ,imgWidth )
661 .println( "imgHeight" ,imgHeight )
662 .println( "filename" ,filename )
663 .println( "roles" ,roles )
664 .println( "target" ,target )
665 .println( "Other..." ,getAttributes().getAttribute() )
666 .fixForm().toString() ;
667 }
668 }