Form表单提交
2016-05-26 15:29
651 查看
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="cm" uri="/WEB-INF/tld/cm.tld" %>
<!DOCTYPE html>
<html lang="zh">
<head>
<title><fmt:message key="title"/></title>
<%@include file="../common/head.jspf" %>
<link rel="stylesheet" href="css/daterangepicker.css" />
</head>
<body class="navbar-fixed">
<%@include file="../common/navbar.jspf" %>
<div class="container-fluid main-container" id="main-container">
<%@include file="../common/sidebar.jspf" %>
<div id="main-content" class="clearfix main-content">
<div id="breadcrumbs" class="breadcrumbs">
<ul class="breadcrumb">
<li>
<i class="icon-home home-icon"></i> <a href="dashboard">首页</a>
<span class="divider">
<i class="icon-angle-right"></i>
</span>
</li>
<li>
贷后管理
<span class="divider">
<i class="icon-angle-right"></i>
</span>
</li>
<li class="active">本日到期欠款</li>
</ul><!--.breadcrumb-->
</div><!--#breadcrumbs-->
<div id="page-content" class="clearfix page-content">
<div class="row-fluid">
<div class="widget-box transparent span-12">
<div class="widget-header">
<h4>
<i class="icon-table"></i>本日到期欠款(含延期欠款)
</h4>
<form action="postLoan/todayQuery" class="pull-right no-margin form-horizontal" method="POST">
<div class="control-group pull-right">
<button class="btn btn-small btn-primary" id="searchHistory">查询</button>
<a class="btn btn-small btn-danger downloadLink"
id="downloadHistory"
href="">下载
</a>
</div>
<div class="control-group pull-right">
<label for="queryCondition" class="control-label">标的号/工号/登录名</label>
<div class="controls">
<input type="text" name="queryCondition">
</div>
</div>
</form>
</div>
<div class="widget-body">
<div class="widget-main no-padding">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>
<i class="icon-star-empty"></i>
状态
</th>
<th>
<i class="icon-user"></i>
借款人
</th>
</tr>
</thead>
<tbody>
<c:forEach var="repay" items="${it.entity}">
<tr>
<td>
${repay.status.key}
</td>
<td>
<a href="user/${repay.user.id}">
${repay.user.loginName}
</a>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<%@include file="../common/foot.jspf" %>
<script type="text/javascript" src="js/amountFormat.js"></script>
<script type="text/javascript">
$('#downloadHistory').click(function() {
var params = {
queryCondition: $('input[name=queryCondition]').val()
};
$(this).attr("href","postLoan/downloadTodayLoans?".concat($.param(params)));
});
</script>
</body>
</html>
标红的form表单提前到后台:只能是@POST
@POST
@Path("/todayQuery")
public Response today(@FormParam("queryCondition") String queryCondition) {
。。。。。。。
repayExt = enrich(totalRepayments); //返回给页面遍历展示的值
return forward("/postLoan/today", repayExt);
}
下载的后台:只能是@GET
@GET
@Path("/downloadTodayLoans")
@Produces(MediaType.APPLICATION_JSON)
public Response downloadTodayLoans(@QueryParam("queryCondition") String queryCondition) throws IOException { }
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="cm" uri="/WEB-INF/tld/cm.tld" %>
<!DOCTYPE html>
<html lang="zh">
<head>
<title><fmt:message key="title"/></title>
<%@include file="../common/head.jspf" %>
<link rel="stylesheet" href="css/daterangepicker.css" />
</head>
<body class="navbar-fixed">
<%@include file="../common/navbar.jspf" %>
<div class="container-fluid main-container" id="main-container">
<%@include file="../common/sidebar.jspf" %>
<div id="main-content" class="clearfix main-content">
<div id="breadcrumbs" class="breadcrumbs">
<ul class="breadcrumb">
<li>
<i class="icon-home home-icon"></i> <a href="dashboard">首页</a>
<span class="divider">
<i class="icon-angle-right"></i>
</span>
</li>
<li>
贷后管理
<span class="divider">
<i class="icon-angle-right"></i>
</span>
</li>
<li class="active">本日到期欠款</li>
</ul><!--.breadcrumb-->
</div><!--#breadcrumbs-->
<div id="page-content" class="clearfix page-content">
<div class="row-fluid">
<div class="widget-box transparent span-12">
<div class="widget-header">
<h4>
<i class="icon-table"></i>本日到期欠款(含延期欠款)
</h4>
<form action="postLoan/todayQuery" class="pull-right no-margin form-horizontal" method="POST">
<div class="control-group pull-right">
<button class="btn btn-small btn-primary" id="searchHistory">查询</button>
<a class="btn btn-small btn-danger downloadLink"
id="downloadHistory"
href="">下载
</a>
</div>
<div class="control-group pull-right">
<label for="queryCondition" class="control-label">标的号/工号/登录名</label>
<div class="controls">
<input type="text" name="queryCondition">
</div>
</div>
</form>
</div>
<div class="widget-body">
<div class="widget-main no-padding">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>
<i class="icon-star-empty"></i>
状态
</th>
<th>
<i class="icon-user"></i>
借款人
</th>
</tr>
</thead>
<tbody>
<c:forEach var="repay" items="${it.entity}">
<tr>
<td>
${repay.status.key}
</td>
<td>
<a href="user/${repay.user.id}">
${repay.user.loginName}
</a>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<%@include file="../common/foot.jspf" %>
<script type="text/javascript" src="js/amountFormat.js"></script>
<script type="text/javascript">
$('#downloadHistory').click(function() {
var params = {
queryCondition: $('input[name=queryCondition]').val()
};
$(this).attr("href","postLoan/downloadTodayLoans?".concat($.param(params)));
});
</script>
</body>
</html>
标红的form表单提前到后台:只能是@POST
@POST
@Path("/todayQuery")
public Response today(@FormParam("queryCondition") String queryCondition) {
。。。。。。。
repayExt = enrich(totalRepayments); //返回给页面遍历展示的值
return forward("/postLoan/today", repayExt);
}
下载的后台:只能是@GET
@GET
@Path("/downloadTodayLoans")
@Produces(MediaType.APPLICATION_JSON)
public Response downloadTodayLoans(@QueryParam("queryCondition") String queryCondition) throws IOException { }
相关文章推荐
- 数据保存成功后,需要刷新页面,但是刷新后还是老数据
- hive根据身份证号判断性别
- 群晖 NAS DSM 系统,只要三步使用 Docker 安装迅雷远程下载
- url链接传递中文的解决办法
- 苏鑫老师谈如何学好编程
- c++中构造函数初始化的方法以及主要区别
- 玩转Android之二维码生成与识别
- iOS开发之SQLite-C语言接口规范(一)——Ready And Open Your SQLite
- html/css学习随笔
- 玩转Android之二维码生成与识别
- 玩转Android之二维码生成与识别
- A folder failed to be renamed or moved
- 树的高度
- 玩转Android之二维码生成与识别
- struct与class区别联系(转)
- java jdk自带的发布服务,wsimport命令生成客户端出错
- Hibernate处理一个实体映射多张相同结构的数据表--动态映射
- python04-函数的定义、调用与递归
- 河北省纪委举报网站:JS代码的错误导致没有人能举报成功
- Java-排序算法