📄 content.jsp
字号:
<%@ page contentType="text/html;charset=GBK" language="java"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ taglib prefix="ww" uri="webwork"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%String contextPath = request.getContextPath();
// String path = DefaultProperty.getProperty("BUGLIST_PATH",
// "/uploads/buglist/");
// WebUser user = (WebUser) request.getSession().getAttribute(
// Web.SESSION_ATTRIBUTE_USER);
%>
<head>
<title>Excel Import Mapping Config</title>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<link rel="stylesheet"
href="<c:out value='${pageContext.request.contextPath}'/>/resource/css/main.css"
type="text/css">
<script src="<%= contextPath %>/js/billitem.js"></script>
<script src="<%= contextPath %>/js/check.js"></script>
<script src="<%= contextPath %>/js/util.js"></script>
<link rel="stylesheet" href="<ww:url id="url" value='/resourse/main.css'/>"/>
<script src="<ww:url value='/script/list.js'/>"></script>
<script src='<ww:url value="/dwr/engine.js"/>'></script>
<script src='<ww:url value="/dwr/util.js"/>'></script>
<script src='<ww:url value="/dwr/interface/FormHelper.js"/>'></script>
<script src='<ww:url value="/dwr/interface/ConfigUtil.js"/>'></script>
<script src='<ww:url value="/dwr/interface/DWRHtmlUtil.js"/>'></script>
<script src='<ww:url value="/dwr/interface/ApplicationUtil.js"/>'></script>
<script src='<ww:url value="/script/htmlutil.js"/>'></script>
<script src="<ww:url value='/script/util.js'/>"></script>
<script language="JavaScript">
<!--
var contextPath = '<%= contextPath %>';
function ev_checkval() {
return true;
}
function ev_save() {
formItem.elements['content.xml'].value=document.BFApplet.saveToXML();
alert(formItem.elements['content.xml'].value);
doSave();
}
function save() {
formItem.elements['content.xml'].value=document.BFApplet.saveToXML();
alert(formItem.elements['content.xml'].value);
forms[0].action='<ww:url action="save"></ww:url>';
forms[0].submit()
}
//-->
</script>
<SCRIPT LANGUAGE="JavaScript">
function addMasterSheet()
{
url="EditMasterSheet.htm"
var rtn=new Object()
rtn=window.showModalDialog(url)
if(rtn!=null){
document.BFApplet.addMasterSheet(rtn.name,rtn.formName,"")
}
}
function addDetailSheet()
{
url="EditDetailSheet.htm"
var rtn=new Object()
rtn=window.showModalDialog(url)
if(rtn!=null){
document.BFApplet.addDetailSheet(rtn.name,rtn.formName,"")
}
}
function addColumn()
{
url="EditColumn.htm"
var rtn=new Object()
rtn=window.showModalDialog(url)
if(rtn!=null){
document.BFApplet.addColumn(rtn.name,rtn.fieldName,rtn.valueScript,rtn.validateRule,"")
}
}
function addRelation()
{
url="EditRelation.htm"
document.BFApplet.addRelation()
}
function editMasterSheet()
{
url="EditMasterSheet.htm"
var oldAttr = new Object();
oldAttr.name = document.BFApplet.getCurrToEditElement().name;
oldAttr.formName = document.BFApplet.getCurrToEditElement().formName;
var rtn=new Object()
rtn=window.showModalDialog(url,oldAttr)
if(rtn!=null){
document.BFApplet.editMasterSheet(rtn.name,rtn.formName,"")
}
}
function editDetailSheet()
{
url="EditDetailSheet.htm"
var oldAttr = new Object();
oldAttr.name = document.BFApplet.getCurrToEditElement().name;
oldAttr.formName = document.BFApplet.getCurrToEditElement().formName;
var rtn=new Object()
rtn=window.showModalDialog(url,oldAttr)
if(rtn!=null){
document.BFApplet.editDetailSheet(rtn.name,rtn.formName,"")
}
}
function editColumn()
{
url="EditColumn.htm"
var oldAttr = new Object();
oldAttr.name = document.BFApplet.getCurrToEditElement().name;
oldAttr.fieldName = document.BFApplet.getCurrToEditElement().fieldName;
oldAttr.valueScript = document.BFApplet.getCurrToEditElement().valueScript;
oldAttr.validateRule = document.BFApplet.getCurrToEditElement().validateRule;
var rtn=new Object()
rtn=window.showModalDialog(url,oldAttr)
if(rtn!=null){
document.BFApplet.editColumn(rtn.name,rtn.fieldName,rtn.valueScript,rtn.validateRule,"")
}
}
function removeElement()
{
document.BFApplet.removeElement()
}
function saveToXML()
{
returnValue=document.BFApplet.saveToXML();
}
function refresh()
{
var xmlstr=document.BFApplet.saveToXML();
frm1.xml.value = xmlstr;
}
function editElement()
{
var toEdit = document.BFApplet.getCurrToEditElement();
if (toEdit != null) {
if (toEdit.getClass().getName()=="cn.myapps.core.dynaform.dts.excelimport.MasterSheet") {
editMasterSheet();
}
else if (toEdit.getClass().getName()=="cn.myapps.core.dynaform.dts.excelimport.DetailSheet") {
editDetailSheet();
}
else if (toEdit.getClass().getName()=="cn.myapps.core.dynaform.dts.excelimport.Column") {
editColumn();
}
}
}
function ev_switchsheet(id) {
document.all('appletcontent').style.display="none";
document.all('xmlcontent').style.display="none";
if (id == 'appletcontent') {
document.all('appletcontent').style.display="";
var xml = document.all('content.xml').value;
document.BFApplet.loadXML(xml);
document.all('modify').checked = false;
} else {
document.all('content.xml').value = document.BFApplet.saveToXML();
document.all('xmlcontent').style.display="";
}
}
function ev_onsubmit()
{
var modify = document.all('modify').checked;
if (!modify) {
document.all('content.xml').value = document.BFApplet.saveToXML();
}
}
function ev_init() {
var xml = document.all('content.xml').value;
document.BFApplet.loadXML(xml);
}
</SCRIPT>
<script src="<%= contextPath %>/js/attachments.js"></script>
</head>
<body onload="ev_init()">
<ww:if test="hasFieldErrors()">
<span class="errorMessage"> <b>Errors:</b><br>
<ww:iterator value="fieldErrors">
*<ww:property value="value[0]" />;
</ww:iterator> </span>
</ww:if>
<table width="98%">
<tr>
<td width="10" class="image-label"><img
src="<ww:url value="/resource/image/email2.jpg"/>" /></td>
<td width="3"></td>
<td width="70" class="text-label">{*[IMPMappingConfig]*}</td>
<td>
<table width="100%" border=1 cellpadding="0" cellspacing="0"
class="line-position">
<tr>
<td></td>
<td class="line-position2" width="60" valign="top">
<button class="button-image" onClick="
ev_onsubmit();
forms[0].action='<ww:url action="save"></ww:url>';
forms[0].submit()"><img src="<ww:url value="/resource/image/save.gif"/>">{*[Save]*}</button>
</td>
<td class="line-position2" width="70" valign="top">
<button class="button-image"
onClick="forms[0].action='<ww:url action="list"><ww:param name="_currpage" value="#parameters['_currpage']"/><ww:param name="_pagelines" value="#parameters['_pagelines']"/><ww:param name="_rowcount" value="#parameters['_rowcount']"/></ww:url>';forms[0].submit();"><img
src="<ww:url value="/resource/image/back.gif"/>">{*[Exit]*}</button>
</td>
</tr>
</table>
</td>
</tr>
</table>
<ww:form id="formItem" action="save" method="post">
<%@include file="/common/page.jsp"%>
<table width="80%" border="0">
<tr>
<td class="commFont" width="20">{*[Name]*}:</td><td align="left"><ww:textfield cssClass="input-cmd" theme="simple"
name="content.name"/>
</td>
</tr>
<ww:bean id="moduleHelper" name="cn.myapps.core.deploy.module.action.ModuleHelper" />
<tr id="moid"><td class="commFont">Module:</td><td>
<ww:select theme="simple" label="Module" name="_moduleid" list="#moduleHelper.getModuleSel(#session.APPLICATION)" />
</td></tr>
<tr>
<td>
<button onClick="ev_switchsheet('appletcontent')">{*[Diagram]*}</button>
<button onClick="ev_switchsheet('xmlcontent')">{*[Code]*}</button>
</td>
</tr>
<tr id="xmlcontent" style="display:none" height="350">
<td colspan="2">
<table>
<tr><td>{*[Modify]*}:
<ww:checkbox name="modify" theme="simple"
onclick="document.all('content.xml').readOnly = !this.checked;document.all('content.xml').style.color = this.checked ? 'black' : 'gray'" /></td>
</tr>
<tr><td>
<ww:textarea name="content.xml" readonly="true" cssStyle="width:700px;height:350px;color:gray">
</ww:textarea>
</td></tr>
</table>
</td>
</tr>
<tr id="appletcontent">
<td colspan="2">
<Script language="JavaScript">
document.write('<applet');
document.write(' codebase = "."');
document.write(' code = "cn.myapps.core.dynaform.dts.excelimport.ExcelMappingApplet.class"');
document.write(' archive = "MinML.jar,MXML.jar"');
document.write(' name = "BFApplet"');
document.write(' width = "100%"');
document.write(' height = "440"');
document.write(' hspace = "0"');
document.write(' vspace = "0"');
document.write(' align = "top"');
document.write(' MAYSCRIPT');
document.write('>');
document.write('<param name="xmlStr" value="' + formItem.elements['content.xml'].value + '">');
document.write('</applet>');
</Script>
<hr>
<input type="button" name="addActor" value="增加MasterSheet"
onClick="addMasterSheet()"> <input type="button" name="addActor"
value="增加DetailSheet" onClick="addDetailSheet()"> <input
type="button" name="addGroup" value="增加Column" onClick="addColumn()">
<input type="button" name="addActor" value="增加关联"
onClick="addRelation()"> <input type="button" name="addActor"
value="删除" onClick="removeElement()"> <input
type="button" name="addActor" value="编辑" onClick="editElement()">
</td>
</tr>
</table>
</ww:form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -