<?xml version="1.0" encoding="UTF-8"?> <!-- $Author: DJ $Date: 2013-2-26 下午2:37:49 $Revision: 1.0 $Purpose: scheduleCreateScreen --> <a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true"> <a:init-procedure> <a:model-query model="sch.sch_default_value" rootPath="default_value_record"/> </a:init-procedure> <a:view> <script type="text/javascript"><![CDATA[ function scheduleCreateScreen_save() { var ds=$('scheduleCreateScreen_mainDs'); var record=ds.getAt(0); record.set('setup_mode','SIMPLE'); ds.submit(); } function scheduleCreateScreen_close() { $('sch_schedule_create').close(); } function refresh_scheduleCreateScreen_futureRunTimeDs(schedule_name) { var ds=$('scheduleCreateScreen_futureRunTimeDs'); ds.setQueryParameter('schedule_name',schedule_name); ds.query(); } function scheduleCreateScreen_onUpdate_mainDs(ds,record,name,value,oldvalue) { if(name=='para_freq') { controlPage(record,value); } if(name=='short_desc') { setDefaultValue(record,'full_desc',value); } } function scheduleCreateScreen_onSubmitsuccess_mainDs(ds) { var record=ds.getAt(0); record.getField('schedule_name').setReadOnly(true); scheduleMaintainScreen_query(); refresh_scheduleCreateScreen_futureRunTimeDs(record.get('schedule_name')); } ]]></script> <a:dataSets> <a:dataSet id="scheduleCreateScreen_defaultDateDs" loadData="true" model="sch.sch_default_value"/> <a:dataSet id="scheduleCreateScreen_freqSimpleDs" lookupCode="SCH_SCHEDULE_FREQ_SIMPLE"/> <a:dataSet id="scheduleCreateScreen_futureRunTimeDs" model="sch.SCH101.sch_schedule_future_run_time"> <a:fields> <a:field name="run_time" readOnly="true"/> </a:fields> </a:dataSet> <a:dataSet id="scheduleCreateScreen_mainDs" autoCreate="true" model="sch.SCH101.sch_schedule_save_simple"> <a:fields> <a:field name="para_byday" validator="validate_1_7"/> <a:field name="para_bymonthday" validator="validate_para_bymonthday"/> <a:field name="start_date" defaultValue="${/model/default_value_record/record/@today}" required="true"/> <a:field name="end_date" defaultValue="${/model/default_value_record/record/@never_date}" required="true"/> <a:field name="para_interval" defaultValue="1" required="true" validator="validate_para_interval"/> <a:field name="schedule_name" required="true" validator="validate_functionName"/> <a:field name="short_desc" required="true"/> <a:field name="full_desc" required="true"/> <a:field name="para_byhour" validator="validate_0_23"/> <a:field name="para_byminute" validator="validate_0_59"/> <a:field name="para_bysecond"/> <a:field name="para_freq_display" displayField="code_value_name" options="scheduleCreateScreen_freqSimpleDs" required="true" returnField="para_freq" valueField="code_value"/> </a:fields> <a:events> <a:event name="update" handler="scheduleCreateScreen_onUpdate_mainDs"/> <a:event name="submitsuccess" handler="scheduleCreateScreen_onSubmitsuccess_mainDs"/> </a:events> </a:dataSet> </a:dataSets> <a:screenBody> <a:screenTopToolbar> <a:gridButton click="scheduleCreateScreen_close" text="HLS.CLOSE"/> <a:gridButton click="scheduleCreateScreen_save" text="HLS.SAVE"/> </a:screenTopToolbar> <a:form column="2" title=" "> <a:textField name="schedule_name" bindTarget="scheduleCreateScreen_mainDs" maxLength="30" typeCase="upper"/> <a:textField name="short_desc" bindTarget="scheduleCreateScreen_mainDs"/> <a:datePicker name="start_date" bindTarget="scheduleCreateScreen_mainDs" renderer="Leaf.formatDate"/> <a:datePicker name="end_date" bindTarget="scheduleCreateScreen_mainDs" renderer="Leaf.formatDate"/> <a:numberField name="para_interval" allowDecimals="false" allowNegative="false" bindTarget="scheduleCreateScreen_mainDs"/> <a:comboBox name="para_freq_display" bindTarget="scheduleCreateScreen_mainDs" prompt="SCH101.SCH_SCHEDULE.PARA_FREQ"/> <a:textField name="para_bymonthday" bindTarget="scheduleCreateScreen_mainDs"/> <a:textField name="para_byday" bindTarget="scheduleCreateScreen_mainDs"/> <a:textField name="para_byhour" bindTarget="scheduleCreateScreen_mainDs"/> <a:textField name="para_byminute" bindTarget="scheduleCreateScreen_mainDs"/> <a:textField name="full_desc" bindTarget="scheduleCreateScreen_mainDs"/> </a:form> <a:form column="2" title="SCH101.FUTURE_RUN_TIME"> <a:textArea name="run_time" bindTarget="scheduleCreateScreen_futureRunTimeDs" height="170" width="450"/> </a:form> </a:screenBody> <script type="text/javascript"><![CDATA[ ( function init_scheduleCreateScreen() { var ds=$('scheduleCreateScreen_mainDs'); var record=ds.getAt(0); var value=record.get('para_freq'); controlPage(record,value); })(); ]]></script> </a:view> </a:screen>