日期:2014-05-18  浏览次数:20636 次

jsp页面到struts2 action 的问题
本帖最后由 q656705009 于 2014-03-04 14:05:31 编辑
Action代码

public class PaySearchAction extends ActionSupport {

/**
 * 
 */
private static final long serialVersionUID = 1L;

public TOrderList tOrderList;// 订单
public TOrderList gettOrderList() {
return tOrderList;
}

public void settOrderList(TOrderList tOrderList) {
this.tOrderList = tOrderList;
}
private List<TOrderList> orderListList;// 用户列表
@Autowired
private TOrderListInter tOrderListInter;

/* 支付订单查询 */
public String paySearch() {
System.out.println("----------------------------------");
if (null == tOrderList) {
orderListList = tOrderListInter.orderList(DataUtil
.getNowOrderListName(), tOrderList);
} else {
if (null == tOrderList.getId() || "".equals(tOrderList.getId())) {
orderListList = tOrderListInter.orderList(DataUtil
.getNowOrderListName(), tOrderList);
}
orderListList = tOrderListInter.orderList(DataUtil
.getTOrderListName(tOrderList.getId()), tOrderList);
}
return SUCCESS;

}



public List<TOrderList> getOrderListList() {
return orderListList;
}

public void setOrderListList(List<TOrderList> orderListList) {
this.orderListList = orderListList;
}
}

JSP代码


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>支付订单查询</title>
<!--样式-->
<link href="../css/global.css" rel="stylesheet" type="text/css" />
<link href="../css/layout.css" rel="stylesheet" type="text/css" />
<script type='text/javascript' src='../js/jquery.min.js'>
</script>
<script language="javascript" type="text/javascript"
src="/My97DatePicker/WdatePicker.js">
</script>

<script type="text/javascript" language="javascript">


</head>

<body>
<div class="searchTitle">
<s:form action="paysearch.action" method="post" id="searchForm"
theme="simple" namespace="/users">
<h1>
支 付 订 单 查 询
</h1>
<ul>
<li>
<label for="id">
订单编号:
</label>
<input type="text" name="tOrderList.id" id="id"
class="searchInput" />
</li>
<li>
<label for="tradeorderid">
支付订单号:
</label>
<input type="text" name="tOrderList.tradeid" id="tradeorderid"
class="searchInput" />
</li>
<li>
<label for="backorderid">
退款订单号:
</label>
<input type="text" name="tOrderList.backid" id=