2015-05-04 82 views
2

我將如何實現殼牌控制註銷功能具有該API例如:https://sapui5.hana.ondemand.com/sdk/docs/api/symbols/sap.ui.commons.ApplicationHeader.html#event:logoffSAPUI5註銷()與殼牌

var oLogoff = new sap.ui.commons.ApplicationHeader(); 

    ... // within the Shell (function logout) 
    logout : function(oEvent) { 
     oLogoff.fireLogoff(); // this.fireLogoff() also not working 
    }, 
    ... 

編輯:
oShell.fireLogout();
- >似乎是正確的,但這種完在一個錯誤「沒有足夠的堆棧內存」..任何人有任何幫助嗎?

我希望返回到登錄頁面...這是自動處理?

回答

1

Shell控件的logout函數只有當某人單擊Shell標頭中的註銷按鈕(請參閱here)時,您可以使用它來觸發您自己的註銷功能。

oShell.fireLogout()因爲您一次又一次地調用您自己的函數而導致堆棧溢出。

註銷本身不會自動完成。根據您的部署方案,註銷實施會因會話管理的不同而有所不同。

0

使用殼容器註銷法:

sap.ushell.Container.logout();