日期:2014-05-19  浏览次数:20760 次

求大神指教哦!
这里是 Jsp页面 list.jsp 显示所有的报价历史

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <title>历史订单</title>
  <script type="text/javascript">
   
  function back(){
history.go(-1);
}

//详细信息
function findByIdFromshow(form,id){
document.getElementById('filterOfferDetailedId').value=id;
alert(id);
var url='<s:url action="show" namespace="/quote"/>';
form.action = url;
form.submit();
}
</script>

  </head>
  
  <body>
  <s:hidden id="filterOfferDetailedId" name="filterOfferDetailedId" value=""/>
  <form>
  <s:token/>
  <table align="center" border="">
  <tr>
<td align="center" colspan="6"><h5>历史报价</h5></td>
</tr>
  <tr>
  <td><s:text name="序号"/></td>
  <td><s:text name="商品名称"/></td>
<td><s:text name="数量"/></td>
<td><s:text name="单价(元)"/></td>
<td><s:text name="金额(元)"/></td>
<td><s:text name="报价日期"/></td>

</tr>
<s:iterator value="pagination.items" status="status">
  <tr>
  <td><a href="javascript:findByIdFromshow(document.forms[0],'<c:out value="${offerDetailedId}"/>');"><s:property value="offerDetailedId" /></a></td>
  <td><s:property value="productName" /></td>
<td><s:property value="productNum" /></td>
<td><s:property value="productPrice" /></td>
<td><s:property value="productNum * productPrice" /></td>
<td><s:property value="createDate"/></td>
  </tr>
  </s:iterator>
  </table>
  </form>
  </body>
</html>
这里是Action层:

package com.shhelian.app.action.chance;

import java.text.SimpleDateFormat;

import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.shhelian.app.model.QuoteDetailed;
import com.shhelian.app.model.SellChance;
import com.shhelian.app.model.SellOrder;
import com.shhelian.app.service.chance.QuoteDetailedService;
import com.shhelian.modules.orm.PaginationSupport;
import com.shhelian.modules.web.struts2.BaseCRUDAction;


@Component("quoteDetailed")
@Scope("prototype")
public class QuoteDetailedAction extends BaseCRUDAction<QuoteDetailed> {

static Logger logger = Logger.getLogger(QuoteDetailedAction.class.getName());

@Autowired
private QuoteDetailedService ent