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

📄 content.jsp

📁 OBPM是一个开源
💻 JSP
字号:
<%@ page language="java" contentType="text/html; charset=GBK"
    pageEncoding="GBK"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
<%@ taglib prefix="ww" uri="webwork"%>
<%@include file="/common/taglibs.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head><title>{*[{*[Column info]*}]*}</title>
<link rel="stylesheet"
	href="<c:out value='${pageContext.request.contextPath}'/>/resource/css/main.css"
	type="text/css"></head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<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>
function ev_init(fn1,fn2) {
	
	var def1 = document.all(fn1).value;
	var def2 = document.all(fn2).value;

	if (document.all(fn1).value==''){def1 = '<ww:property value="content.formid"/>'}
	if (document.all(fn2).value==''){def2 = '<ww:property value="content.fieldName"/>'}
	if(document.all(fn1).value=='')
		def2='none';

	var func = new Function("ev_init('"+fn1+"','"+fn2+"')");

	document.all(fn1).onchange = func;
	FormHelper.creatFormfieldOptions(fn2,def1,def2,function(str) {var func=eval(str);func.call()});
}

function ev_onchange(val) {
	document.all('vstrid').style.display='';
	document.all('fntrid').style.display='';
	document.all('fftrid').style.display='';

	if (val=='COLUMN_TYPE_FIELD'){
		document.all('vstrid').style.display='none';
	}
	else if (val=='COLUMN_TYPE_SCRIPT') {
		document.all('fntrid').style.display='none';
		document.all('fftrid').style.display='none';
	}
}

</script>
<body >
<ww:form name="columnform" action="save" method="post">
<ww:bean name="cn.myapps.core.dynaform.view.action.ColumnHelper" id="helper" />
<ww:bean name="cn.myapps.core.dynaform.form.action.FormHelper" id="formHelper" >
	<ww:param name="moduleid" value="#parameters.moduleid" />
</ww:bean>
 <%@include file="/common/page.jsp"%>
<ww:hidden name="moduleid" value="%{#parameters.moduleid}"/>
<ww:hidden name="viewid"/>
<ww:hidden name="s_view" value="%{#parameters.viewid}"/>
<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="90" class="text-label">{*[Column info]*}</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>
	<ww:textfield cssClass="input-cmd" label="{*[Column name]*}" name="content.name" />
	<ww:textfield cssClass="input-cmd" label="{*[Column width]*}" name="content.width"/>
	<ww:radio  label="{*[Type]*}" name="content.type" list="#helper.getTypeList()" onclick="ev_onchange(this.value)"/>
	<tr id='vstrid' style="display:none">
	    <td class="tdLabel"><label for="save_content_valueScript" class="label">{*[Vaule script]*}:</label></td>
		<td>
			<ww:textarea  cssClass="input-cmd" label="{*[Vaule script]*}" name="content.valueScript" cols="40" rows="5" theme="simple"/>
		</td>
	</tr>

	<tr id='fntrid'>
	    <td class="tdLabel"><label for="save_content_formid" class="label">{*[Form]*}:</label></td>
		<td>
			<ww:select label="Form" name="content.formid" list="#formHelper.get_normalFormList(#session.APPLICATION)" listKey="id"
				listValue="name" emptyOption="true" theme="simple"/>
		</td>
	</tr>
	<tr id='fftrid'>
	    <td class="tdLabel"><label for="save_content_fieldName" class="label">{*[Field]*}:</label></td>
		<td>
			<ww:select label="{*[Field]*}" name="content.fieldName" list="{}" emptyOption="true" theme="simple" />
		</td>
	</tr>
</ww:form>

</body>
<script>
ev_init('content.formid','content.fieldName');
  var tempvalue='';
  for (var i=0;i<document.forms[0].elements.length;i++){  
		var e=document.forms[0].elements[i];		
		if ((e.type=='radio')&&e.checked){  
				 tempvalue = e.value;
			}	 
			
  		}
  if(tempvalue!=''&&tempvalue=='COLUMN_TYPE_SCRIPT')
  {
       document.all('vstrid').style.display='';
	   document.all('fntrid').style.display='none';
		document.all('fftrid').style.display='none';
  }
  </script>
</html>

⌨️ 快捷键说明

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