如何在Struts 2显示标签中调整[上一个/上一个] [下一个/最后一个]链接的位置 [英] How to adjust the position of [last/prev] [next/last] links in Struts 2 display tag

查看:87
本文介绍了如何在Struts 2显示标签中调整[上一个/上一个] [下一个/最后一个]链接的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的Struts代码.我想知道如何调整[last/prev] [next/last]链接在显示标签中的位置

Here is my Struts code. I would like to know that how can I adjust the position of [last/prev] [next/last] links in display tag

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="http://displaytag.sf.net" prefix="display" %>
<html>
`enter code here`
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Forbes Top 10 Richest Sports Stars 2009</title>
<link href="css/displaytag.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <h2>Forbes Top 10 Richest Sports Stars 2009</h2>
    <display:table export="true" id="data"
        name="sessionScope.HomeForm.richSportsmanList"
        requestURI="/homeAction.do" pagesize="3">
        <display:column property="place" title="Place" sortable="true" />
        <display:column property="name" title="Name" sortable="true" />
        <display:column property="age" title="Age" sortable="true" />
        <display:column property="annualIncome" title="Income(in m/yr)"
            sortable="true" />
    </display:table>
    <p>Note : List is according to Forbes List 2009</p>
</body>
</html>

推荐答案

displaytag允许通过display.properties文件修改其功能.您可以将默认为top的属性paging.banner.placement覆盖为<display:setProperty name="paging.banner.placement" value="bottom" />.要调整横幅的位置([first/prev] [next/last]链接所在的位置),您必须覆盖该属性

The displaytag allows modification of its features through the display.properties file. You can override the property paging.banner.placement that is top by default to the <display:setProperty name="paging.banner.placement" value="bottom" /> To adjust position of the banner (where [first/prev] [next/last] links in) you have to override the property

paging.banner.full=<div class="pagelinks" align="right"><a href={1}>First</a><a href={2}>Prev</a>{0}<a href={3}>Next</a><a href={4}>Last</a></div>

现在,您必须通过更改类pagelinks或通过添加style属性来设置横幅的位置来修改div标签的样式.例如position: absolute; top: 75px; left: 260px; width: 245px; background-color: azure;

Now you have to modify the style of the div tag via changing the class pagelinks or via adding style attribute to set the position of the banner. For example position: absolute; top: 75px; left: 260px; width: 245px; background-color: azure;

这篇关于如何在Struts 2显示标签中调整[上一个/上一个] [下一个/最后一个]链接的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆