带外壳的SAPUI5 logOff() [英] SAPUI5 logOff() with Shell

查看:91
本文介绍了带外壳的SAPUI5 logOff()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何在具有以下API示例的Shell控件中实现注销功能:

How would I realize the logoff function in Shell control having this API example: https://sapui5.hana.ondemand.com/sdk/docs/api/symbols/sap.ui.commons.ApplicationHeader.html#event:logoff

    var oLogoff = new sap.ui.commons.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()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆