Adding target attribute to <a> of DisplayTag

元气小坏坏 提交于 2020-07-23 06:19:24

问题


I am using display tag library for downloading the content as CSV and XLS.

I am able to download the files but after opening the downloaded file am unable to click on any other links in the application. (This is specific to IE Browser)

But am able to click on a button . I understood that adding target="_blank" in the Anchor tag that is dynamically created by just passing requestURI="....." and some of the properties from displaytag.property will resolve this (I tested this in developer tool).

Is there a way to add target="_blank" in the tag

**Property File:**

css.tr.even=tbl1
css.tr.odd=tbl2

basic.msg.empty_list=

export.types=csv excel pdf xml
export.banner=<div class="exportlinks">Download to: {0}</div>

export.csv.include_header=true
export.excel.include_header=true

export.csv=true
export.csv.filename=tmp.csv
export.excel=true
export.excel.filename=tmp.xls
export.pdf=false
export.pdf.filename=tmp.pdf
export.xml=false

paging.banner.placement=both

**Code:**
<display:table 
name="myForm.myList" id="row" cellpadding="3" cellspacing="1" requestURI="/mymthd.do" 
export="true" style="width:100%; text-align:left;">
                            
<display:column title="Date" property="date" sortable="true" />
                            
<display:column title="Time" property="time" sortable="true" />
                            
<display:column title="ID" sortable="true">

.............

来源:https://stackoverflow.com/questions/62916788/adding-target-attribute-to-a-of-displaytag

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!