<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>导入导出</title>
<c:set var="ctx" value="${pageContext.request.contextPath}"></c:set>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<link rel="stylesheet" type="text/css" href="${ctx }/resources/components/displayTag1.2/css/displaytag.css" />
<script language="javascript" type="text/javascript" src="${ctx }/resources/components/mootools/mootools1.3.2/mootools-core.js"></script>
<script language="javascript" type="text/javascript" src="${ctx }/resources/components/My97DatePicker/My97DatePicker4.8/WdatePicker.js"></script>
</head>
<body>
<!-- isis,its,mars,simple,report,mark -->
<display:table name="aircraftList" id="d" requestURI="${ctx }/eg/imexport_list.action">
<display:column property="product" title="机型" sortable="true" headerClass="sortable"></display:column>
<display:column property="width" title="展翼"></display:column>
...............................
<display:column property="firstFlyDate" title="首飞" format="{0,date,yyyy-MM-dd}"></display:column>
</display:table>
<form id="add_form2" name="add_form2" action="" method="post" enctype="multipart/form-data">
文件:<input id="file1" name="attachments" value="" type="file"/>
<input type="button" id="importExcel" name="importExcel" value="导入Excel" onclick="doImportExcel()"/>
<input type="button" id="exportExcel" name="exportExcel" onclick="doExportExcel()" value="导出xls"/>
<input type="button" id="exportWord" name="exportWord" onclick="doExportWord()" value="导出doc"/>
<input type="button" id="exportPdf" name="exportPdf" onclick="doExportPdf()" value="导出pdf"/>
</form>
</body>
</html>
<script type="text/javascript">
function doExportExcel(){
var urll = '${ctx }/eg/imexport_exportExceling.action';
window.location.href = urll;
}
function doExportWord(){
var urll = '${ctx }/eg/imexport_exportWording.action';
window.location.href = urll;
}
function doExportPdf(){
var urll = '${ctx }/eg/imexport_exportPdfing.action';
window.location.href = urll;
}
function doImportExcel(){
var urll = '${ctx }/eg/imexport_importExceling.action';
$('add_form2').action = urll;
$('add_form2').submit();
}
</script>
package com.csmn.test.common.po;
import java.util.Date;
/**
* Aircraft entity.
*
* @author MyEclipse Persistence Tools
*/
public class Aircraft {
// Fields
private static final long serialVersionUID = 2971249282191355753L;
private String aircraftId;
private String product;
private Double length;
private Double width;
private Double hight;
private Integer seatingCapacity;
private Double speed;
private Integer range;
private Double selfWeight;
private Double loadWeight;
private Double maxFlyWeight;
private Double fuelQuantity;
private String engineType;
private String engineProduct;
private Integer thrust;
private Date firstFlyDate;
// ............geter & seter..............
}