📄 content.jsp
字号:
<%@include file="/common/taglibs.jsp"%>
<%@ page contentType="text/html;charset=GBK" language="java"%>
<%String contextPath = request.getContextPath();%>
<html>
<head>
<title>{*[Resource]*}</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/ApplicationUtil.js"/>'></script>
<script src='<ww:url value="/script/htmlutil.js"/>'></script>
<script src="<ww:url value='/script/util.js'/>"></script>
<link rel="stylesheet"
href="<c:out value='${pageContext.request.contextPath}'/>/resource/css/main.css"
type="text/css">
<script>
function ev_init(fn1,fn2,fn3) {
var def1 = document.all(fn1).value;
var def2 = document.all(fn2).value;
var def3 = document.all(fn3).value;
if (document.all(fn1).value==''){def1 = '<ww:property value="content.actionclass"/>'}
if (document.all(fn2).value==''){def2 = '<ww:property value="content.actionmethod"/>'}
if (document.all(fn3).value==''){def3 = '<ww:property value="content.actionurl"/>'}
else if (document.all(fn1).value=='none'){
def2 = 'none';
def3 = 'none';
}
var func = new Function("ev_init('"+fn1+"','"+fn2+"','"+fn3+"')");
document.all(fn1).onchange = func;
document.all(fn2).onchange = func;
document.all(fn1).onchange = func;
ConfigUtil.createActionClassesOptionFunc(fn1,def1,function(str) {var func=eval(str);func.call()});
ConfigUtil.createActionMethodsOptionFunc(fn2,def1,def2,function(str) {var func=eval(str);func.call()});
ConfigUtil.createActionUrlsOptionFunc(fn3,def1,def2,def3,function(str) {var func=eval(str);func.call()});
}
</script>
<script>
function ev_select(module,view)
{
var mv = document.all(module).value;
var vv = document.all(view).value;
if (document.all(view).value=='') {
vv = '<ww:property value="content.displayView"/>'
}
if (document.all(module).value=='') {
mv = '<ww:property value="content.module"/>';
}
else if (document.all(module).value=='none'){
vv = 'none';
}
var func = new Function("ev_select('"+module+"','"+view+"')");
document.all(module).onchange = func;
document.all(view).onchange = func;
ApplicationUtil.creatModule(module,'<ww:property value="#session.APPLICATION"/>',mv,function(str) {var func=eval(str);func.call()});
ApplicationUtil.creatView(view,'<ww:property value="#session.APPLICATION"/>',mv,vv,function(str) {var func=eval(str);func.call()});
}
</script>
<script>
function ev_report(module,report)
{
var mv = document.all(module).value;
var vv = document.all(report).value;
if (document.all(report).value=='') {
vv = '<ww:property value="content.report"/>'
}
if (document.all(module).value=='') {
mv = '<ww:property value="content.reportModule"/>';
}
else if (document.all(module).value=='none'){
vv = 'none';
}
var func = new Function("ev_report('"+module+"','"+report+"')");
document.all(module).onchange = func;
document.all(report).onchange = func;
ApplicationUtil.creatModule(module,'<ww:property value="#session.APPLICATION"/>',mv,function(str) {var func=eval(str);func.call()});
ApplicationUtil.creatReports(report,'<ww:property value="#session.APPLICATION"/>',mv,vv,function(str) {var func=eval(str);func.call()});
}
</script>
<script>
var contextPath = '<%=contextPath%>';
function ev_change(n)
{
var rb;
if(n==null||n=='')
{
rb = eval("formItem.elements('content.resourceAction')");
for(var i=0; i< rb.length; i++){
if(rb[i].checked){
n=rb[i].value;
}
}
}
if(n=='00') {
act.style.display='none';
vw.style.display='none';
ul.style.display='none';
rp.style.display='none';
}
else if(n=='02')
{act.style.display='';
vw.style.display='none';
ul.style.display='none';
rp.style.display='none';
}
else if(n=='01')
{ vw.style.display='';
act.style.display='none';
ul.style.display='none';
rp.style.display='none';
}
else if(n=='03')
{ ul.style.display='';
vw.style.display='none';
act.style.display='none';
rp.style.display='none';
}
else if(n=='04')
{ rp.style.display='';
ul.style.display='none';
vw.style.display='none';
act.style.display='none';
}
}
function ev_load()
{
var ra = eval("formItem.elements('content.resourceAction')");
var tmp='<ww:property value="content.resourceAction"/>';
for(var i=0; i< ra.length; i++){
if(ra[i].value == '<ww:property value="content.resourceAction"/>'){
ra[i].checked = true;
break;
}
}
ev_change('<ww:property value="content.resourceAction"/>');
if ('<ww:property value="#parameters['refresh']" />'=='true') {
parent.frames[0].location.reload();
}
}
function Save()
{
var value;
var rc = eval("formItem.elements('content.resourceAction')");
for(var i=0; i< rc.length; i++){
if(rc[i].checked){
value=rc[i].value;
}
}
if(value==null||value=='')
{
alert("{*[Please select a action!]*}");
return;
}
else
{
for(var i=0; i< rc.length; i++){
if(rc[i].checked){
if(value=='02')
{
//
if(document.forms[0].elements('content.actionurl').value=='none'||document.forms[0].elements('content.actionurl').value==''){alert('{*[Please select a action]*}ActionClass');return}};
else if(value=='01')
{
if(document.forms[0].elements('content.displayView').value=='none'||document.forms[0].elements('content.displayView').value==''){alert('{*[Please Select a view!]*}');return}};
else
if(value=='03')
{
if(document.forms[0].elements('content.otherurl').value==''||document.forms[0].elements('content.otherurl').value==null){ alert('Please Enter OtherUrl');return}};
break;
}
}
}
document.forms[0].action = document.forms[0].action + "?refresh=true";
document.forms[0].submit();
}
</script>
</head>
<body onload="ev_load()">
<ww:bean name="cn.myapps.core.dynaform.view.action.ViewHelper" id="vh" />
<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">{*[Resource]*}</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="Save();"><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" />';forms[0].submit();"><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>
<ww:form action="save" method="post" theme="simple" name="formItem" validate="true">
<%@include file="/common/page.jsp"%>
<table width="80%" >
<tr>
<td class="commFont" algin="left">{*[Type]*}:</td><td><ww:select cssClass="input-cmd" label="{*[Type]*}" name="content.type" list="#{'00':'{*[Menu]*}','01':'{*[Page]*}'}"
required="true" /></td></tr>
<tr><td class="commFont" algin="left">{*[Description]*}:</td><td><ww:textfield cssClass="input-cmd" label="{*[Description]*}" name="content.description" /></td></tr>
<tr><td class="commFont" algin="left">{*[Superior]*}:</td><td><ww:select cssClass="input-cmd" label="{*[Superior Menu]*}" name="_superiorid" list="get_menus(#session.APPLICATION)" /></td></tr>
<tr><td class="commFont" algin="left">{*[Isprotected]*}:</td><td><ww:radio label="{*[Isprotected]*}" name="isprotected"
list="#{'true':'{*[Yes]*}','false':'{*[No]*}'}" /></td></tr>
<tr><td class="commFont" algin="left">{*[SerialNum]*}:</td><td><ww:textfield cssClass="input-cmd" label="*[SerialNum]*}" name="content.orderno" /></td></tr>
<tr><td class="commFont" algin="left">{*[Icon]*}:</td>
<td colspan="3">
<ww:textfield name="content.ico" cssClass="bugLong-input" readonly="true"/>
<button name='btnSelectDept' class="button-image" onClick="formItem.elements['content.ico'].value=uploadFile('RESOURCE_PATH',formItem.elements['content.ico'].value)">
<img src="<ww:url value="/resource/image/search.gif"/>"></button>
</td></tr>
<tr><td class="commFont" algin="left">
{*[Action]*}:</td><td><ww:radio name="content.resourceAction" onclick="ev_change()" list="#{'00':'None','01':'View','04':'Report','02':'ActionClass','03':'OtherUrl'}"></ww:radio>
</td></tr>
</table>
<table>
<tr id="vw" style="display:none"><td>
<!-- <ww:select cssClass="input-cmd" label="Application" name="content.application" list="{}" /> -->
<ww:select cssClass="input-cmd" label="Module" name="content.module" list="{}" />
<ww:select cssClass="input-cmd" label="View" name="content.displayView" list="{}" />
</td></tr>
<tr id="rp" style="display:none"><td>
<!-- <ww:select cssClass="input-cmd" label="Application" name="content.reportAppliction" list="{}" /> -->
<ww:select cssClass="input-cmd" label="Module" name="content.reportModule" list="{}" />
<ww:select cssClass="input-cmd" label="View" name="content.report" list="{}" />
</td></tr>
<tr id="act" style="display:none"><td>
<ww:select cssClass="input-cmd" label="ActionClass" name="content.actionclass" list="{}" />
<ww:select cssClass="input-cmd" label="ActionMethod" name="content.actionmethod" list="{}" />
<ww:select cssClass="input-cmd" label="{*[Action]*}" name="content.actionurl" list="{}" />
</td></tr>
<tr id="ul" style="display:none"><td>
<ww:textfield cssClass="input-cmd" label="{*[Other]*} URL" name="content.otherurl" />
</td></tr>
</ww:form>
</body>
<script>
ev_init('content.actionclass','content.actionmethod','content.actionurl');
ev_select('content.module','content.displayView');
ev_report('content.reportModule','content.report');
</script>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -