⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 content.jsp

📁 OBPM是一个开源
💻 JSP
字号:
<%@ page language="java" contentType="text/html; charset=GBK"
	pageEncoding="GBK"%>
<%@include file="/common/taglibs.jsp"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
<%@ taglib prefix="ww" uri="webwork"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>Insert title here</title>
<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/ConfigUtil.js"/>'></script>
<script src='<ww:url value="/dwr/interface/DWRHtmlUtil.js"/>'></script>
<script src='<ww:url value="/dwr/interface/ActivityUtil.js"/>'></script>
<script src='<ww:url value="/script/generic.js"/>'></script>
<style type="text/css">
<!--
.STYLE1 {font-size: 12px}
-->
</style>
<script language="JavaScript" type="text/javascript">
function ev_init(fn1,fn2,fn3,fn4) {
var instance = '<%= session.getAttribute("APPLICATION")%>';
var mdlid = '<%= request.getParameter("s_module")%>';
var def1 = document.all(fn1).value;
var def2 = document.all(fn2).value;
var def3 = document.all(fn3).value;
var def4 = document.all(fn4).value;

if (document.all(fn1).value==''){def1 = '<ww:property value="content.type"/>'}
if (document.all(fn2).value==''){def2 = '<ww:property value="_onActionViewid"/>'}
if (document.all(fn3).value==''){def3 = '<ww:property value="_onActionFormid"/>'}
if (document.all(fn4).value==''){def4 = '<ww:property value="_onActionFlowid"/>'}
else if (document.all(fn1).value=='none'){
	def2 = 'none';
	def3 = 'none';
	def4 = 'none';
}

oview_tr.style.display = "none";
oflow_tr.style.display = "none";	
oform_tr.style.display = "none";

var func = new Function("ev_init('"+fn1+"','"+fn2+"','"+fn3+"','"+fn4+"')");
document.all(fn1).onchange = func;


ActivityUtil.createType(fn1,def1,function(str) {var func=eval(str);func.call()});
ActivityUtil.createOnActionView(fn2,def1,mdlid,def2,instance,function(str) {var func=eval(str);func.call()});
ActivityUtil.createOnActionForm(fn3,def1,mdlid,def3,instance,function(str) {var func=eval(str);func.call()});
ActivityUtil.crateOnActionFlow(fn4,def1,mdlid,def4,function(str) {var func=eval(str);func.call()});

	switch (def1) {
		case '1':
			oview_tr.style.display = "";
			break;
		case '5':
			oflow_tr.style.display = "";
			break;
		case '2':
			oform_tr.style.display = "";
			break;
		case '4':
			oform_tr.style.display = "";
			break;
		default:
			break;
		}
}	

function ev_onsubmit() {
		var typeSelect = document.all('content.type').value;
		var vidvalue = document.all('_onActionViewid').value;
		var fidvalue = document.all('_onActionFormid').value;
		var flowid = document.all('_onActionFlowid').value;
		var url = save.action;
		alert(document.all('_iconid').value);
		if(url.indexOf("list") != -1) {
			//alert(url.indexOf("list"));
			return true;
		}
		
		else if(vidvalue == '' && (typeSelect.value == 1)) {
			alert('Please choose onActionView');
			return false;
		}
	
		else if(fidvalue == '' && (typeSelect.value == 2 || typeSelect.value == 4)) {
			alert('Please choose onActionForm');
			return false;
		}
		
		else if(flowid == '' && typeSelect.value == 5) {
			alert('Please choose onActionFlow');
			return false;
		}
		
		return true;
	}

	function init() {
		useLoadingImage('<ww:url value="/resource/images/ajax-loader.gif" />');
	}

	callOnLoad(init)
</script>
<link rel="stylesheet"
	href="<c:out value='${pageContext.request.contextPath}'/>/resource/css/main.css"
	type="text/css">
<script>
function ev_load(){
	parent.document.getElementById("div_activity").style.width = document.all('div_act').offsetWidth;
	parent.document.getElementById("div_activity").style.height =document.all('div_act').offsetheight;

}
</script>
</head>
<body onLoad="document.forms[0].onsubmit = ev_onsubmit;">
<div id="div_act" style='overflow:auto;width:500px;height:360px'>
<ww:form name="actform" action="save" method="post"
	onsubmit="" validate="true">
	 <%@include file="/common/page.jsp"%>
	<input type="hidden" name="s_module"
		value="<ww:property value='#parameters.s_module'/>">
	<input type="hidden" name="moduleid"
		value="<ww:property value='#parameters.s_module'/>">

	<ww:bean
		name="cn.myapps.core.image.repository.action.ImageRepositoryHelper"
		id="ih">
		<ww:param name="moduleid" value="#parameters.s_module" />
	</ww:bean>
	<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">{*[Activity]*}</td>
			<td>
			<table width="100%" border=1 cellpadding="0" cellspacing="0"
				class="line-position">
				<tr>
					<td></td>
					<td class="line-position2" width="80" valign="top">
					<button class="button-longimage"
						onClick="forms[0].action='<ww:url action="saveAndNew"></ww:url>';forms[0].submit();"><img
						src="<ww:url value="/resource/image/save.gif"/>">{*[SaveAndNew]*}</button>
					</td>
					<td class="line-position2" width="60" valign="top">

					<button class="button-image"
						onClick="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="if(parent){parent.close()}else{window.close();}"><img
						src="<ww:url value="/resource/image/back.gif"/>">{*[Exit]*}</button>
					</td>
				</tr>
			</table>
			</td>
		</tr>
	</table>
	<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>
		<tr>
			<td><ww:hidden name="_viewid" /></td>
		</tr>
		<tr>
			<td><ww:hidden name="_formid" /></td>
		</tr>
		
		<tr>
		    <td class="commFont">{*[Name]*}:</td>
			<td align="left"><ww:textfield 	theme="simple" name="content.name" /></td>
		</tr>
		<tr>
		     <td class="commFont">{*[Type]*}:</td>
			<td align="left"><ww:select 	name="content.type" list="{}" theme="simple" /></td>
		</tr>

		<tr id="oview_tr">
			<td class="commFont">{*[OnActionView]*}:</td>
			<td align="left"><ww:select name="_onActionViewid" list="{}" theme="simple"/></td>
		</tr>

		<tr id="oform_tr">
			<td class="commFont">{*[OnActionForm]*}</td>
			<td align="left"><ww:select name="_onActionFormid" list="{}" theme="simple"/></td>
		</tr>

		<tr id="oflow_tr">
			<td class="commFont">{*[OnActionFlow]*}</td>
			<td align="left"><ww:select name="_onActionFlowid" list="{}" theme="simple"/></td>
		</tr>
	
		<tr>
			<td class="commFont">{*[Icon]*}:</td>
			<td align="left"><ww:select  name="_iconid" list="#ih.get_listImage(#session.APPLICATION)"  emptyOption="true" theme="simple" /></td>
		</tr>
		<tr>
		   <td class="commFont" colspan="2">{*[BeforeActionScript]*}:</td>
		  
		</tr>
		<tr>
		    
			<td colspan="2"><ww:textarea cssClass="input-cmd"
				name="content.beforeActionScript" cols="50" rows="3" theme="simple" /></td>
		</tr>
		<tr>
		   <td class="commFont" colspan="2">{*[HiddenScript]*}:</td>
		  
		</tr>
		<tr>
		  <td colspan="2" ><ww:textarea cssClass="input-cmd" 
				name="content.hiddenScript" cols="50" rows="3" theme="simple"  /></td>
		</tr>
	</table>
</ww:form></div>
</body>
<script language="JavaScript">
ev_init('content.type','_onActionViewid','_onActionFormid','_onActionFlowid');
</script>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -