|
1如何禁用用户在任务上的"取回"权限,
2使用以下JSP进入X3后,直接关闭IE时报错.如果注销提示"不能注销",直接关闭IE报错信息如附图
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="com.justep.loader.LibContext"%>
<%@ page import="java.lang.reflect.Method" %>
<%
Class pclass = LibContext.getInstance().getLoader().loadClass("com.justep.web.SysServerProvider");
Object pobj = pclass.newInstance();
Method getBXClassIDMethod = pclass.getMethod("getBXClassID",new Class[]{});
Method getBXCodeMethod = pclass.getMethod("getBXCodebase",new Class[]{});
Method getSysServerURLMethod = pclass.getMethod("getSysServerURL",new Class[]{});
String classId = (String)getBXClassIDMethod.invoke(pobj,new Object[]{});
String codeBase = (String)getBXCodeMethod.invoke(pobj,new Object[]{});
String url = (String)getSysServerURLMethod.invoke(pobj,new Object[]{});
%>
<%
String username = request.getParameter("username");
String password = request.getParameter("password");
%>
<HTML>
<HEAD>
<title>>X3 协同管理系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</HEAD>
<BODY leftmargin="0" topmargin="0" scroll="no">
<OBJECT id = "X3X"
classid="<%= classId%>"
codebase="<%= codeBase%>"
width="100%"
height="100%"
align=center
hspace=0
vspace=0
>
</OBJECT>
<object id="WebBrowser" width=0 height=0 classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2">
</object>
<script ID="BusinessCloseEventHandler" language="javascript" FOR="BusinessX" EVENT="OnTerminate">
WebBrowser.ExecWB(45,1); // close window
</script>
<script type="text/javascript">
var username = "<%=username%>";
var pwd = "<%=password%>";
function BeforeClose()
{
if(!X3X.TerminateQuery())
{
event.returnValue = "";
}
}
document.title = X3X.DisplayName;
X3X.ServerURL = "<%= url%>"
X3X.ShowSplash();
X3X.UpdateVersion();
X3X.Init();
X3X.CloseSplash();
X3X.Logon(username,pwd);
X3X.Run("Biz:\System\Init.Func", "", "", "");
document.body.onbeforeunload=BeforeClose;
document.title = X3X.DisplayName;
</script>
</BODY>
</HTML>
|
|