我如何在具有以下API示例的Shell控件中实现注销功能: sapui5.hana.ondemand/sdk/docs/api/symbols/sap.uimons.ApplicationHeader.html#event:logoff
How would I realize the logoff function in Shell control having this API example: sapui5.hana.ondemand/sdk/docs/api/symbols/sap.uimons.ApplicationHeader.html#event:logoff
var oLogoff = new sap.uimons.ApplicationHeader(); ... // within the Shell (function logout) logout : function(oEvent) { oLogoff.fireLogoff(); // this.fireLogoff() also not working }, ...oShell.fireLogout(); ->似乎是正确的,但这最终导致错误堆栈内存不足" ..有人帮忙吗?
oShell.fireLogout(); --> seems to be right, but this Ends up in an error "Not enough stack Memory" .. anybody any help?
我希望返回登录页面...这是自动处理的吗?
I expect returning to a Login-page ... is this handled automatically?
推荐答案Shell控件的logout函数只是一个事件,当有人单击Shell头中的注销按钮时,您可以使用该事件来触发自己的注销函数(请参见此处).
The logout function of the Shell control is only an event you can use to trigger your own logout function when someone clicks the logout button in the Shell header (see here).
oShell.fireLogout()最终会导致堆栈溢出,因为您一次又一次地调用自己的函数.
oShell.fireLogout() ends up in a stack overflow as you´re calling your own function again and again.
注销本身不会自动为您完成.退出部署的实现因会话管理的执行方式不同而异,具体取决于您的部署方案.
The logout itself is not done for you automatically. Depending on your deployment scenario the logout implementation differs as the session management is done differently.
更多推荐
带外壳的SAPUI5 logOff()
发布评论