67 lines
2.8 KiB
Plaintext
67 lines
2.8 KiB
Plaintext
<%@ page contentType="text/html; charset=GBK"%>
|
|
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
|
/*
|
|
Author: zhulh 2017-04-20
|
|
Content: 示例详情页面
|
|
History Log:
|
|
*/
|
|
String sPrevUrl = CurPage.getParameter("PrevUrl");
|
|
if(sPrevUrl == null) sPrevUrl = "";
|
|
|
|
String sTempletNo = "QrtzTriggerInfo";//--模板号--
|
|
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
|
doTemp.setHtmlEvent("CRON_EXPRESSION", "onClick", "createCronExpression");
|
|
doTemp.setHtmlEvent("JOB_CLASS_NAME", "onChange", "createJobRelative");
|
|
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
|
dwTemp.Style = "2";//freeform
|
|
//dwTemp.ReadOnly = "-2";//只读模式
|
|
dwTemp.genHTMLObjectWindow(CurPage.getParameter("TRIGGER_NAME"));
|
|
|
|
String sButtons[][] = {
|
|
{"true","All","Button","保存","保存所有修改","saveOrUpdateJobAndTrigger()","","","","btn_icon_save"},
|
|
{"true","All","Button","返回","返回列表","returnList()","","","","btn_icon_back"}
|
|
};
|
|
sButtonPosition = "south";
|
|
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
|
<script type="text/javascript">
|
|
function returnList(){
|
|
parent.AsDialog.ClosePage();
|
|
}
|
|
|
|
function createCronExpression(){
|
|
var cronExpression = this.getItemValue(0,getRow(0),"CRON_EXPRESSION");
|
|
var sParam = "cronExpression="+cronExpression;
|
|
AsDialog.PopView("/Tenwa/Core/quartz/QuartzCronManager.jsp",sParam,"resizable=yes;dialogWidth=600px;dialogHeight=350px;center:yes;status:no;statusbar:no",function(e){
|
|
setItemValue(0,getRow(),"CRON_EXPRESSION",e);
|
|
},"Cron表达式");
|
|
}
|
|
|
|
function createJobRelative(){
|
|
var jobClassName = getItemValue(0,0,"job_class_name");
|
|
var sReturn = AsControl.RunJsp("/Tenwa/Core/quartz/CheckJob.jsp","jobClassName="+jobClassName);
|
|
if(sReturn != "None"){
|
|
setItemValue(0,getRow(0),"JOB_NAME",sReturn);
|
|
}else{
|
|
setItemValue(0,getRow(0),"JOB_NAME","");
|
|
}
|
|
}
|
|
|
|
function saveOrUpdateJobAndTrigger(){
|
|
if(!iV_all('myiframe0'))return;
|
|
var sParam = "className="+getItemValue(0,getRow(0),"JOB_CLASS_NAME")+",jobName="+getItemValue(0,getRow(0),"JOB_NAME")
|
|
+ ",cronExpression="+getItemValue(0,getRow(0),"CRON_EXPRESSION")+",description="+getItemValue(0,getRow(0),"DESCRIPTION")
|
|
+ ",triggerState="+getItemValue(0,getRow(0),"TRIGGER_STATE")+",misfire="+getItemValue(0,getRow(0),"MISFIRE_INSTR")
|
|
+ ",startTime="+getItemValue(0,getRow(0),"START_TIMEN")+",endTime="+getItemValue(0,getRow(0),"END_TIMEN")+",triggerName="+getItemValue(0,getRow(0),"TRIGGER_NAME");
|
|
var result = RunJavaMethodTrans("com.tenwa.quartz.QuartzServerImpl","saveOrUpdateJobAndTrigger",sParam);
|
|
if(result == "SUCCESS"){
|
|
alert("操作成功!");
|
|
parent.AsDialog.ClosePage();
|
|
}else if(result == "ERROR"){
|
|
alert("操作失败!");
|
|
}else{
|
|
alert(result);
|
|
}
|
|
}
|
|
|
|
</script>
|
|
<%@ include file="/Frame/resources/include/include_end.jspf"%> |