SSH集成之导入导出代码示例-页面部分(1)

<%@ 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..............
}

转载于:https://my.oschina.net/chwencong/blog/66203

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值