将数据添加到JSP的显示表 [英] Add data to JSP's display table

查看:80
本文介绍了将数据添加到JSP的显示表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<display:table name="example" class="FORM">
            <display:setProperty name="paging.banner.placement" value="bottom" />
            <display:setProperty name="paging.banner.all_items_found" value=""/>
            <display:setProperty name="paging.banner.onepage" value=""/>
            <display:setProperty name="paging.banner.one_item_found" value=""/>
            <display:column property="userId" sortable="false" title="User ID" headerClass="sortable"/>
            <display:column property="dateAdded" sortable="false" title="Added Date" headerClass="sortable"/>
            <display:column property="statusDate" sortable="false" title="Status Date" headerClass="sortable"/>
            <display:column property="params" sortable="false" title="Parameters" headerClass="sortable"/>
            <display:column property="status" sortable="false" title="Status" headerClass="sortable"/>
        </display:table>

所以我的JSP页面中有此表.像这样从Java文件中的ArrayList设置所有数据:

So I have this table in my JSP page. All the data gets set from an ArrayList in a java file like this:

ArrayList options = new ArrayList(); (Has data in it though....)
request.setAttribute("example", options);

如何将其动态添加到该表中?该信息来自一个SQL查询,我希望能够使用一个偏移量并添加新数据.

How can I just add to this table dynamically? The information comes from an SQL query and I want to just be able to use an offset and add the new data.

推荐答案

如果需要通过SQL查询动态添加更多数据,可以进行Ajax查询,然后向当前表添加新行.

If you need to add more data dynamically from SQL query, you can make Ajax query and then to add new rows to the current table.

这篇关于将数据添加到JSP的显示表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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