appletExceptionHandler.jsp 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <%@ page contentType="text/html;charset=UTF-8" %>
  2. <%@ page import="com.kingdee.eas.cp.common.web.util.WebContextUtil"%>
  3. <%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean" %>
  4. var appletExpMsgBox = new WebMsgDialog("<%= WebContextUtil.getPortalContextPath(request) %>");
  5. var exps = new Array();
  6. exps["INVALID_URL"]="<bean:message bundle='ssoLogin' key='INVALID_URL'/>";
  7. exps["INVALID_EAS_JNLP"]="<bean:message bundle='ssoLogin' key='INVALID_EAS_JNLP'/>";
  8. exps["EAS_JNLP_DOWNLOAD_FAILS"]="<bean:message bundle='ssoLogin' key='EAS_JNLP_DOWNLOAD_FAILS'/>";
  9. exps["EAS_JNLP_SAVE_FAILS"]="<bean:message bundle='ssoLogin' key='EAS_JNLP_SAVE_FAILS'/>";
  10. exps["INVALID_SERVICE_PROVIDER"]="<bean:message bundle='ssoLogin' key='INVALID_SERVICE_PROVIDER'/>";
  11. exps["ACTION_PEFORM_FAILS"]="<bean:message bundle='ssoLogin' key='ACTION_PEFORM_FAILS'/>";
  12. exps["APPLET_INIT_FAILS"]="<bean:message bundle='ssoLogin' key='APPLET_INIT_FAILS'/>";
  13. exps["APPLET_INIT_FAILS_HELP"]="<bean:message bundle='ssoLogin' key='APPLET_INIT_FAILS_HELP'/>";
  14. function handleAppletException(resxItemKey,errMsg)
  15. {
  16. try
  17. {
  18. swapAppletInitFailText();
  19. appletExpMsgBox.showIndexMessageBox(appletExpMsgBox.TYPE_NOTICE,exps[resxItemKey],errMsg);
  20. }
  21. catch(e)
  22. {
  23. //let applet go on running...
  24. //ignore
  25. }
  26. }
  27. //function setLogined(sessionId){
  28. // var form = top.LoginFrame.document.EasForm ;
  29. // form.easSessionId.value = sessionId;
  30. //}
  31. function swapAppletInitFailText()
  32. {
  33. var initFailText = exps["APPLET_INIT_FAILS_HELP"];
  34. if(typeof(DownloadingTextLayer) !="undefined")
  35. DownloadingTextLayer.innerHTML = initFailText ;
  36. if(typeof(top.ContentFrame.loginProcceBarID) != "undefined")
  37. top.ContentFrame.loginProcceBarID.innerHTML = "<span class='processbar_label'>"+initFailText +"</span>";
  38. }