js文件看不懂,大侠指点,万谢
这是一个叫resources.js的文件,其中的this.resources等不知引用是什么?/*
* 资源工厂,定义消息资源。
* 在ResourceFactory_CreateInstance函数里定义每一个消息。
*
* $Id$
*/
function ResourceFactory() {
this.resources = {};
this.constants = {};
this.getResource = ResourceFactory_GetResource;
this.getConstant = ResourceFactory_GetConstant;
this.createInstance = ResourceFactory_CreateInstance;
this.init = ResourceFactory_Init;
}
function ResourceFactory_GetResource(name) {
return this.resources[name] ? this.resources[name] : this.resources['hoo'];
}
function ResourceFactory_GetConstant(name) {
return this.constants[name] ? this.constants[name] : this.constants['hoo'];
}
function ResourceFactory_CreateInstance() {
this.resources['hoo'] = "内部错误";
this.constants['hoo'] = "";
this.init();
return this;
}
function ResourceFactory_Init() {
this.resources['WM_nowidget'] = "没有这个窗口部件对象:";
this.resources['WM_nodesktop'] = "没有这个桌面对象:";
this.resources['TM_confirm_switchchildtask'] = "当前任务正在运行,并且有未完成的子任务,不能关闭,请先处理子任务。\n现在切换到子任务吗?";
this.resources['Timer_taskidconflicted'] = "定时任务ID冲突,该任务ID已使用。任务ID:";
this.resources['MENU_confirmlogout'] = "您将退出本次登录重新登录系统,确认吗?";
this.resources['MENU_confirmclose'] = "您将退出系统,确认吗?";
this.resources['TP_notasktarget'] = "没有设定任务目标(url or formObj)。";
this.resources['TP_invoketaskinitialize'] = "调用任务生命周期方法__taskInitialize出错:";
this.resources['TP_invoketaskpresent'] = "调用任务生命周期方法__taskPresent出错:";
this.resources['TP_invoketaskreactive'] = "调用任务生命周期方法__taskReactive出错:";
this.resources['TP_invoketaskfinalize'] = "调用任务生命周期方法__taskFinalize出错:";
this.resources['MessageInfoSuffix'] = " 条新消息";
this.resources['WM_errorinitwidgets'] = "初始化界面失败,请检查screen-layout.xml配置,错误信息:";
this.resources['WM_elementlayoutcallbackerror'] = "调用部件自定义Ajax脚本出错,请检查screen-layout.xml配置,错误信息:";
this.resources['TM_closetaskerror'] = "关闭任务出错,请检查自定义回调方法或传入的linkage对象,错误信息:";
this.constants['default_task_icon'] = "ui/images/www7.gif";
this.constants['default_loading_page'] = "ui/loading.jsp";
this.constants['logout_method'] = "/login.do?method=logout";
}