0

我使用 displaytag 粘贴我的表格代码。我的问题是页脚显示在表格的顶部,即使使用 css 我也无法将其放在底部。

我在桌子周围使用表格和 Spring web flow。会不会引起一些冲突??如果是这样,我该如何解决?任何帮助都会非常感激。

<form:form method="POST" id="tableForm">
    <display:table id="row" name="displayTagValueList" requestURI="overview?_eventId=tableAction">
        <display:setProperty name="paging.banner.item_name" value="Thread"/>
        <display:setProperty name="paging.banner.items_name" value="Threads"/>
        <display:setProperty name="paging.banner.group_size" value="5"/>
        <display:setProperty name="basic.msg.empty_list" value="No threads found."/>

        <display:setProperty name="paging.banner.full" value='<span class="pagelinks"><a href="{1}">&lt;&lt;First</a>&nbsp;&nbsp;<a href="{2}">&lt;Prev</a>&nbsp;&nbsp;{0}&nbsp;&nbsp;<a href="{3}">Next&gt;</a>&nbsp;&nbsp;<a href="{4}">Last&gt;&gt;</a></span>'/>
        <display:setProperty name="paging.banner.first" value='<span class="pagelinks">&lt;&lt;First&nbsp;&nbsp;&lt;Prev&nbsp;&nbsp;{0}&nbsp;&nbsp;<a href="{3}">Next&gt;</a>&nbsp;&nbsp;<a href="{4}">Last&gt;&gt;</a></span>'/>
        <display:setProperty name="paging.banner.last" value='<span class="pagelinks"><a href="{1}">&lt;&lt;First</a>&nbsp;&nbsp;<a href="{2}">&lt;Prev</a>&nbsp;&nbsp;{0}&nbsp;&nbsp;Next&gt;&nbsp;&nbsp;Last&gt;&gt;</span>'/>


        <display:column title="">
            <form:checkbox path="chosenIds" value="${row.id}"/>
        </display:column>

        <display:column title="Some title" >
            <c:out value="${row.someValue}"/>
        </display:column>

        <display:footer>
            <div class="tableFooter" >
                <input type='checkbox' name='checkall' onclick='checkedAll(tableForm);'>  select all
                <input type="submit" name="_eventId_someTransitions" value="Send" />
            </div>
        </display:footer>
    </display:table>
    </form:form>
4

1 回答 1

0

显然, display:footer 标签必须在里面包含一个表格。<div>标签不包含在tfoot. 所以解决方案是

<display:footer>
                <tr>
                    <td class="footerColumn"><input type='checkbox' name='checkall' onclick='checkedAll(tableForm);'>  select all
                    <td class="footerColumn"><input type="submit" name="_eventId_someTransitions" value="Send" /></td>
                    <td class="footerColumn"></td>
                    <td class="footerColumn"></td>
                    <td class="footerColumn"></td>
                    <td class="footerColumn"></td>
                    <td class="footerColumn"></td>
                    <td class="footerColumn"></td>
                    <td class="footerColumn"></td>
                    <td class="footerColumn"></td>
                <tr>
        </display:footer>

我也觉得很烦人,如果声明了类,则样式不会采用<tr>(样式只是黑色背景色)。

Besides, since in my table I have 10 columns, I have to declare 10 <td>, and all the column take the correspondent footer witdh. I have googled, but nothing found. Is there a way to play more independant with styles? The styles are just inherit from the table ones.

于 2012-07-31T08:57:34.737 回答