DisplayTag 导出和链接
我正在使用 DisplayTag 库 1.2,导出时所有链接都导出为文本。如何从导出中删除链接。
I'm using the DisplayTag library 1.2 and on the export all links are exported as text. How to remove the links from export.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(1)
您可以将 display:column 标记上的媒体属性设置为“html”,以便仅在 JSP 上显示该列,而不在导出中显示该列。然后,您将再次获得相同的列,但将媒体属性设置为您的导出类型,例如“excel”,以便它仅显示在导出中,而不显示在 JSP 上。
例如,我有一个“标题”列,其中有一个链接,但我不希望导出该链接。不过,我确实希望导出纯标题。我通过使用两个 display:column 条目来实现这一点:一个用于在 JSP 中查看,另一个用于导出到 Excel:
You can set the media attribute to 'html' on the display:column tag to only show that column on the JSP and not in the export. You then have the same column again, but with the media attribute set to your export type, say 'excel' so that it only shows in the export and not on the JSP.
For instance I have a 'title' column that has a link in it, but I don't want the link exported. I do however want the pure title exported. I do this by having two display:column entries: one for viewing in the JSP and one for exporting to excel: