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" のみ
037 * ファイルア??ロー?
038 * ・command="COPY|INSERT" のみ
039 *
040 * また?typeDownload="true" にするとDownload 処?行う為の前??実施します?
041 * Download 処?行うには、指定?画面(呼び出し?)と、抜き?した時?
042 * DBTableModel が??して?か判定します?
043 * また?DBTableModel が存在しな??また?、不備な場?オーバ?フロー)は?
044 * ?SQLを実行する?があり、そもそも?抜?処?出来な?態では?
045 * エラーを返す?があります?
046 * それら???のDownload 処?行うかど?を指定します?
047 * true の場合?session の HybsSystem.DB_LAST_SQL_KEY に格納された
048 * DBLastSql オブジェクトを取得し、scope ?request また?、overflow ?
049 * true の場合に、BODY部を実行します?(通常、queryタグを記述します?)
050 * query の出力?は、scope ?request にします?
051 * それ以外?、tableId から取り出した DBTableModel を?scope = "request"
052 * に(アドレスのみ)コピ?します?
053 * writeTable タグでは、scope = "request" から、DBTableModel を取り?します?
054
055 * @og.formSample
056 * ●形式:?ユーザーが直接?込?とはありません?
057 * ●body?あ?
058 *
059 * ●Tag定義??
060 * <og:fileUD
061 * command 【TAG】command を指定しま?
062 * downloadImg 【TAG】ダウンロード時のアイコンを指定しま?初期値:"{@SYS.JSP}/image/fileDownload.gif")
063 * downloadJsp 【TAG】ダウンロード時の呼び出しJSPを指定しま?初期値:"{@SYS.JSP}/common/fileDownload.jsp")
064 * uploadImg 【TAG】ア??ロード時のアイコンを指定しま?初期値:"{@SYS.JSP}/image/fileUpload.gif")
065 * uploadJsp 【TAG】ア??ロード時の呼び出しJSPを指定しま?初期値:"{@SYS.JSP}/common/fileUpload.jsp")
066 * imgWidth 【TAG】アイコン?イズ(px)を指定しま?初期値:20px)
067 * imgHeight 【TAG】アイコン高さサイズ(px)を指定しま?初期値:20px)
068 * filename 【TAG】ダウンロード時ファイル名を?しま?初期値:"{@GUI.LABEL}.xls")
069 * roles 【TAG】ロールズをセ?しま?
070 * target 【TAG】ダウンロード文書を表示させるフレー??また?ウィンドウの名前を指定しま?
071 * errorMsg 【TAG】ダウンロード?来な??合?エラーメ?ージIDを指定しま?初期値:ERR0028)
072 * typeDownload 【TAG】Download 処?行うかど?を指定しま?初期値:false)
073 * editImg 【TAG】編?イコンを指定しま?初期値:"{@SYS.JSP}/image/edit.png")
074 * clmEdit 【TAG】編?にカラ?ditを表示するかど?(初期値:true)
075 * debug 【TAG】デバッグ??を?力するかど?[true/false]を指定しま?初期値:false)
076 * > ... Body ...
077 * </og:fileUD>
078 *
079 * ●使用?
080 * <og:fileUD command="{@command}" />
081 *
082 * <og:fileUD
083 * command = command設?(?ンロー?"NEW|RENEW|FIRST|LAST|PREV|NEXT|VIEW" ? ア??ロー?"COPY|INSERT")
084 * [ downloadImg ] = "{@SYS.JSP}/image/fileDownload.gif" ?ンロード時のアイコン
085 * [ downloadJsp ] = "{@SYS.JSP}/common/fileDownload.jsp" ?ンロード時の呼び出しJSP
086 * [ uploadImg ] = "{@SYS.JSP}/image/fileUpload.gif" ア??ロード時のアイコン
087 * [ uploadJsp ] = "{@SYS.JSP}/common/filePopup.jsp" ア??ロード時の呼び出しJSP
088 * [ imgWidth ] = "20px" アイコン?イズ(px)
089 * [ imgHeight ] = "20px" アイコン高さサイズ(px)
090 * [ filename ] = "{@GUI.LABEL}.xls" ?ンロード時ファイル?
091 * [ roles ] = "GE|DOC" アクセスロールズ
092 * [ target ] = "_blank" ?ンロードファイルを開くターゲ?
093 * [ errorMsg ] = "ERR0028" エラーメ?ージID
094 * [ typeDownload] = "false/true" Download 処?行うかど?(初期値:false)
095 * />
096 *
097 * @og.group ファイルア??ロー??ンロー?
098 *
099 * @og.rev 4.3.0.0 (2008/07/04) 新規追?
100 *
101 * @version 4.0
102 * @author Kazuhiko Hasegawa
103 * @since JDK5.0,
104 */
105 public class FileUDTag extends CommonTagSupport {
106 //* こ?プログラ??VERSION??を設定します? {@value} */
107 private static final String VERSION = "5.6.0.2 (2013/01/19)" ;
108
109 private static final long serialVersionUID = 560220130119L ;
110
111 private String sysJsp = HybsSystem.sys( "JSP" );
112
113 private String command = null; // ?ンロー?"NEW|RENEW" 、ア??ロー?"COPY|INSERT"
114 private String downloadImg = sysJsp + "/image/fileDownload.gif"; // ?ンロード時のアイコン
115 private String downloadJsp = sysJsp + "/common/fileDownload.jsp"; // ?ンロード時の呼び出しJSP
116 private String uploadImg = sysJsp + "/image/fileUpload.gif"; // ア??ロード時のアイコン
117 private String uploadJsp = sysJsp + "/common/filePopup.jsp"; // ア??ロード時の呼び出しJSP
118 private String imgWidth = "20px"; // アイコン?イズ(px)
119 private String imgHeight = "20px"; // アイコン高さサイズ(px)
120 private String filename = null; // ?ンロード時ファイル?"{@GUI.LABEL}.xls")
121 private String roles = null; // アクセスロールズ
122 // private String target = "_blank"; // ?ンロードファイルを開くターゲ?
123 private String target = null; // ?ンロードファイルを開くターゲ?
124 private String errorMsg = "ERR0028"; // 選択されて?せん。も???択しなおして下さ??
125 private boolean isError = false;
126 private boolean typeDownload = false; // Download 処?行うかど?(初期値:false)
127 private boolean isEdit = true; // 5.6.0.2 (2013/01/19) ロールのisEditとほぼ同等?clmEdit用?
128
129 private static final String EDIT_GAMENID= "14_EDIT"; // 編?面の画面ID
130 private String editImg = sysJsp + "/image/edit.png"; // 編?のアイコン
131
132 /**
133 * Taglibの開始タグが見つかったときに処??doStartTag() ?オーバ?ライドします?
134 *
135 * @og.rev 5.1.6.0 (2010/05/01) 画面?並べ替え対?
136 *
137 * @return 後続????(SKIP_BODY)
138 */
139 @Override
140 public int doStartTag() {
141
142 if( typeDownload ) {
143 DBLastSql lastSql = (DBLastSql)getSessionAttribute( HybsSystem.DB_LAST_SQL_KEY );
144 if( lastSql != null ) {
145 String guikey = getRequest().getParameter( "gamenId" );
146 if( lastSql.isGuiMatch( guikey ) ) {
147
148 // view タグで仕込んだ clmNames を?Request 変数に設定します?
149 setRequestAttribute( "DB.CLM_NAMES" , lastSql.getClmNames() );
150 // 5.1.6.0 (2010/05/01) 画面?並べ替え対?
151 setRequestAttribute( "DB.VIEW_CLM_NAMES" , lastSql.getViewClmNames() );
152 setRequestAttribute( "DB.VIEW_EDITABLE" , Boolean.toString( lastSql.isViewEditable() ) );
153
154 // if( lastSql.isRequest() || lastSql.isOverflow() ) {
155 if( lastSql.isRequest() ) {
156 // 5.1.6.0 (2010/05/01)
157 // String sql = getUserInfo( "USER.LASTSQL" );
158 String sql = getUserInfo( "LASTSQL" );
159 if( sql != null ) {
160 return( EVAL_BODY_BUFFERED ); // Body を評価する? extends BodyTagSupport ?
161 }
162 }
163 String tableId = lastSql.getTableId();
164 setRequestAttribute( HybsSystem.TBL_MDL_KEY, getSessionAttribute( tableId ) );
165 return(SKIP_BODY); // Body を評価しな?
166 }
167 }
168
169 // 処?実行できな??合?エラーを?力します?
170 jspPrint( getResource().getLabel( errorMsg ) );
171 isError = true;
172 }
173
174 return(SKIP_BODY); // Body を評価しな?
175 }
176
177 /**
178 * Taglibの終?グが見つかったときに処??doEndTag() ?オーバ?ライドします?
179 *
180 * @og.rev 4.3.0.1 (2008/08/11) callBack パラメータの設定漏れ修正、引数から見直?
181 * @og.rev 5.1.6.0 (2010/05/01) 帳票画面定義機?対?
182 * @og.rev 5.1.7.0 (2010/06/01) 進??戻る?タンで?xcel出力?タンを??
183 * @og.rev 5.3.6.0 (2011/06/01) Edit機?見直?
184 * @og.rev 5.3.7.0 (2011/07/01) Excel取込で画面IDとアドレスが異なる?合にエラーとなるバグを修正
185 * @og.rev 5.3.7.0 (2011/07/01) 編?面をリサイズできるように対応します?
186 * @og.rev 5.3.7.0 (2011/07/01) PL/SQLを利用した検索でファイル?ンロードが出来るよ?対応します?
187 * @og.rev 5.4.2.0 (2011/12/01) 画面リソースで画面編??のON/OFFを設定できるようにする?
188 * @og.rev 5.5.2.4 (2012/05/16) nullに対する冗長な比?
189 * @og.rev 5.5.5.2 (2012/08/20) 画面リソースのoモード対?
190 * @og.rev 5.5.6.2 (2012/09/24) makeTagのtarget対?
191 * @og.rev 5.6.0.2 (2013/01/19) editモード?isEditコントロール対?
192 *
193 * @return 後続????
194 */
195 @Override
196 public int doEndTag() {
197 debugPrint();
198
199 if( isError ) { return(SKIP_PAGE); } // ペ?ジの残りの処?行わな??
200 if( typeDownload ) { return(EVAL_PAGE); } // ペ?ジの残りを評価する?
201
202 boolean isDownload ;
203 if( "NEW".equals( command ) || "RENEW".equals( command )
204 || "FIRST".equals( command ) || "LAST".equals( command )
205 || "PREV".equals( command ) || "NEXT".equals( command )
206 || "VIEW".equals( command ) ) {
207 isDownload = true;
208 }
209 else if( "COPY".equals( command ) || "INSERT".equals( command ) ) {
210 isDownload = false;
211 }
212 else {
213 return(EVAL_PAGE);
214 }
215
216 byte bitMode ;
217 if( roles != null ) {
218 RoleMode roleMode = RoleMode.newInstance( roles );
219 RoleMode userRoleMode = getUser().getRoleMode();
220 bitMode = userRoleMode.getAccessBitMode( roleMode );
221 }
222 else {
223 GUIInfo guiInfo = (GUIInfo)getSessionAttribute( HybsSystem.GUIINFO_KEY );
224 bitMode = guiInfo.getBitMode();
225 }
226
227 if( filename == null ) {
228 filename = getGUIInfoAttri( "LABEL" ) + ".xls" ;
229 }
230 String guikey = getGUIInfoAttri( "KEY" ); // 4.3.0.1 (2008/08/11)
231 if( isDownload ) {
232 if( RoleMode.isDownload( bitMode ) ) {
233 // 4.3.0.1 (2008/08/11) callBack パラメータの設定漏れ修正、引数から見直?
234 // <og:link href="{@SYS.JSP}/common/fileDownload.jsp" target="_blank" useGamenId="false"
235 // keys="filename,h_clms" vals="{@GUI.LABEL}.xls,{@h_clms}" >
236
237 // 5.3.7.0 (2011/07/01) PL/SQLを利用した検索でファイル?ンロードが出来るよ?対応します?
238 String href = downloadJsp + "?command=RENEW&gamenId=" + guikey + "&GAMENID=" + guikey + "&filename=" + StringUtil.urlEncode( filename ) ;
239
240 // jspPrint( makeTag( downloadImg,downloadJsp,"Download File" ) );
241 // jspPrint( makeTag( downloadImg,href,"Download File" ) );
242 jspPrint( makeTag( downloadImg,href,"Download File", target ) ); // 5.5.6.2 (2012/09/24)
243
244 // 5.1.6.0 (2010/05/01) 帳票画面定義機?対?
245 // 5.3.6.0 (2011/06/01) Edit機?見直?
246 GUIInfo editGui = getUser().getGUIInfo( EDIT_GAMENID );
247 if( editGui != null ) {
248 String hrefEdit = sysJsp + "/" + editGui.getAddress() + "/"
249 + "?command=NEW&gamenId=" + guikey + "&GAMENID=" + guikey;
250
251 String editName = getRequestValue( "editName" );
252 // 5.5.2.4 (2012/05/16) nullに対する冗長な比?
253 if( editName != null ) {
254 // hrefEdit += "&editName=" + ( editName == null ? "" : editName );
255 hrefEdit += "&editName=" + editName;
256 }
257
258 // 5.4.2.0 (2011/12/01) 画面リソースで画面編??のON/OFFを設定できるようにする?
259 // if( RoleMode.isEdit( bitMode ) ) {
260 if( RoleMode.isEdit( bitMode ) && isEdit ) { // 5.6.0.2(2013/01/09)
261 hrefEdit += "&edit=true";
262 }
263
264 // 5.5.5.2 (2012/08/10) 画面リソースで、画面編??の制限を行えるよ?する
265 if( RoleMode.isFullEdit( bitMode ) ) {
266 hrefEdit += "&fullEdit=true";
267 }
268 else{
269 hrefEdit += "&fullEdit=false";
270 }
271
272 // 5.3.7.0 (2011/07/01) 編?面をリサイズできるように対応します?
273 hrefEdit = "javascript:ogOpen('" + hrefEdit + "',null,null,'width=800px,height=330px,top=350,left=100,resizable=yes',false);";
274 // jspPrint( makeTag( editImg,hrefEdit,"Edit" ) );
275 jspPrint( makeTag (editImg,hrefEdit,"Edit",null) ); // 5.5.6.2 (2012/09/24)
276 }
277 }
278 }
279 else {
280 if( RoleMode.isUpload( bitMode ) ) {
281 // 4.3.0.1 (2008/08/11) callBack パラメータの設定漏れ修正、引数から見直?
282 // <og:link href="{@SYS.JSP}/common/filePopup.jsp" keys="callBack" vals="{@GUI.KEY}/{@SESSION.JSPID}" >
283
284 String jspId = (String)getSessionAttribute( "JSPID" );
285 // 5.3.7.0 (2011/07/01) Excel取込で画面IDとアドレスが異なる?合にエラーとなるバグを修正
286 String callBack = getGUIInfoAttri( "ADDRESS" ) + "/" + jspId + "?GAMENID=" + guikey;
287 callBack = StringUtil.urlEncode( callBack );
288 // String href = uploadJsp + "?callBack=" + guikey + "/" + jspId ;
289 String href = uploadJsp + "?callBack=" + callBack;
290
291 // jspPrint( makeTag( uploadImg,uploadJsp,"Upload File" ) );
292 // jspPrint( makeTag( uploadImg,href,"Upload File" ) );
293 jspPrint( makeTag( uploadImg,href,"Upload File",target ) ); // 5.5.6.2 (2012/09/24)
294 }
295 }
296
297 return(EVAL_PAGE);
298 }
299
300 /**
301 * タグリブオブジェクトをリリースします?
302 * キャ?ュされて再利用される?で、フィールド?初期設定を行います?
303 *
304 */
305 @Override
306 protected void release2() {
307 super.release2();
308 sysJsp = HybsSystem.sys( "JSP" );
309 command = null; // ?ンロー?"NEW|RENEW|FIRST|LAST|PREV|NEXT|VIEW" 、ア??ロー?"COPY|INSERT"
310 downloadImg = sysJsp + "/image/fileDownload.gif"; // ?ンロード時のアイコン
311 downloadJsp = sysJsp + "/common/fileDownload.jsp"; // ?ンロード時の呼び出しJSP
312 uploadImg = sysJsp + "/image/fileUpload.gif"; // ア??ロード時のアイコン
313 uploadJsp = sysJsp + "/common/filePopup.jsp"; // ア??ロード時の呼び出しJSP
314 imgWidth = "20px"; // アイコン?イズ(px)
315 imgHeight = "20px"; // アイコン高さサイズ(px)
316 filename = null; // ?ンロード時ファイル?"{@GUI.LABEL}.xls")
317 roles = null; // アクセスロールズ
318 // target = "_blank"; // ?ンロードファイルを開くターゲ?
319 target = null; // ?ンロードファイルを開くターゲ?
320 errorMsg = "ERR0028"; // 選択されて?せん。も???択しなおして下さ??
321 typeDownload = false; // Download 処?行うかど?(初期値:false)
322 isError = false;
323 editImg = sysJsp + "/image/edit.png"; // 編?のアイコン
324 isEdit = true; // 5.6.0.2 (2013/01/19)
325 }
326
327 /**
328 * リンクを作?します?
329 *
330 * @og.rev 4.3.0.1 (2008/08/11) callBack パラメータの設定漏れ修正、引数から見直?
331 * @og.rev 5.5.6.2 (2012/09/24) tgt引数追?
332 *
333 * @param imgsrc イメージソース
334 * @param href リンクのURL
335 * @param alt イメージの説明文書
336 * @param tgt HTMLのtarget
337 *
338 * @return リンク??
339 */
340 // private String makeTag( final String imgsrc, final String jspsrc, final String alt ) {
341 // private String makeTag( final String imgsrc, final String href, final String alt ) {
342 private String makeTag( final String imgsrc, final String href, final String alt, final String tgt ) { // 5.5.6.2 (2012/09/24)
343 // <og:link href="{@SYS.JSP}/common/fileDownload.jsp" target="_blank" useGamenId="false"
344 // keys="filename,h_clms" vals="{@GUI.LABEL}.xls,{@h_clms}" >
345 // <og:img width="20px" height="20px" src="{@SYS.JSP}/image/fileDownload.gif" alt="Download File"/>
346 // </og:link>
347 // <og:equals val1="{@command}" val2="COPY|INSERT" matches="true" >
348 // <og:link href="{@SYS.JSP}/common/filePopup.jsp" keys="callBack" vals="{@GUI.KEY}/{@SESSION.JSPID}" >
349 // <og:img width="20px" height="20px" src="{@SYS.JSP}/image/fileUpload.gif" alt="Upload File"/>
350 // </og:link>
351 // </og:equals>
352
353 // linkのBODY部にセ?するイメージタグの作?
354 Attributes imgAttri = new Attributes();
355 imgAttri.set( "width" , imgWidth );
356 imgAttri.set( "height" , imgHeight );
357 imgAttri.set( "src" , imgsrc );
358 imgAttri.set( "alt" , alt );
359
360 String img = XHTMLTag.img( imgAttri );
361
362 // 4.3.0.1 (2008/08/11) callBack パラメータの設定漏れ修正、引数から見直?
363 // linkタグの作?
364 // String guikey = getGUIInfoAttri( "KEY" );
365 // String[] keys = new String[] { "filename","gamenId" };
366 // String[] vals = new String[] { filename , guikey };
367
368 // String path = XHTMLTag.urlEncode( keys,vals );
369
370 Attributes linkAttri = new Attributes();
371 // linkAttri.set( "href" , jspsrc + "?" + path );
372 linkAttri.set( "href" , href );
373 linkAttri.set( "body" , img );
374 // linkAttri.set( "target" , target );
375 linkAttri.set( "target" , tgt ); // 5.5.6.2 (2012/09/24)
376
377
378 return XHTMLTag.link( linkAttri );
379 }
380
381 /**
382 * 【TAG】command を指定します?
383 *
384 * @og.tag
385 * command を指定します?
386 * ?ンロード??NEW|RENEW|FIRST|LAST|PREV|NEXT|VIEW" のみ有効です?
387 * ア??ロード??COPY|INSERT" のみ有効です?
388 * それ以外?コマンドでは、アイコンは表示されません?
389 * 例えば、NEXT/PREV など?
390 *
391 * @param cmd コマンド[NEW/RENEW/FIRST/LAST/PREV/NEXT/VIEW]
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を指定しま?初期値:ERR0028)?
544 *
545 * @og.tag
546 * DBTableModel が??に作?された画面と、メモリ中の DBLastSql オブジェクトが
547 * 管?て???が異なる?合?、ダウンロード?来ません?
548 * 同様に、DBLastSql オブジェク?自身が作?されて???合も出来ません?
549 * そ?ようなケースに表示するエラーメ?ージのメ?ージIDを指定します?
550 * 引数は、指定できません?
551 * 初期値は、?ERR0028?選択されて?せん。も???択しなおして下さ???です?
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 * こ?オブジェクト???表現を返します?
588 * 基本???目?使用します?
589 *
590 * @return こ?クラスの??表現
591 */
592 @Override
593 public String toString() {
594 return org.opengion.fukurou.util.ToString.title( this.getClass().getName() )
595 .println( "VERSION" ,VERSION )
596 .println( "command" ,command )
597 .println( "downloadImg" ,downloadImg )
598 .println( "downloadJsp" ,downloadJsp )
599 .println( "uploadImg" ,uploadImg )
600 .println( "uploadJsp" ,uploadJsp )
601 .println( "imgWidth" ,imgWidth )
602 .println( "imgHeight" ,imgHeight )
603 .println( "filename" ,filename )
604 .println( "roles" ,roles )
605 .println( "target" ,target )
606 .println( "Other..." ,getAttributes().getAttribute() )
607 .fixForm().toString() ;
608 }
609 }