com.vaadin.ui.UI.detach()方法的使用及代码示例

x33g5p2x  于2022-01-31 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(138)

本文整理了Java中com.vaadin.ui.UI.detach()方法的一些代码示例,展示了UI.detach()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。UI.detach()方法的具体详情如下:
包路径:com.vaadin.ui.UI
类名称:UI
方法名:detach

UI.detach介绍

[英]Called before the UI is removed from the session. A UI instance is detached exactly once, either:

  • after it is explicitly #close().
  • when its session is closed or expires
  • after three missed heartbeat requests.

Note that when a UI is detached, any changes made in the detachmethods of any children or DetachListeners that would be communicated to the client are silently ignored.
[中]在从会话中删除UI之前调用。UI实例只分离一次,可以是:
*在显式#close()之后。
*当其会话关闭或过期时
*在三次错过心跳请求后。
请注意,当用户界面被分离时,任何子级或DetachListener的detachmethods中所做的任何更改都会被悄悄地忽略,这些更改将被传递给客户端。

代码示例

代码示例来源:origin: com.vaadin/vaadin-server

if (session == null) {
  try {
    detach();
  } catch (Exception e) {
    getLogger().log(Level.WARNING,

代码示例来源:origin: OpenNMS/opennms

@Override
public void detach() {
  super.detach();
}

代码示例来源:origin: org.opennms.features.topology/org.opennms.features.topology.app

@Override
public void detach() {
  super.detach();
}

代码示例来源:origin: peholmst/SpringSecurityDemo

@Override
public void detach() {
  timer.cancel();
  super.detach();
}

代码示例来源:origin: peholmst/SpringSecurityDemo

@Override
public void detach() {
  super.detach();
  timer.cancel();
}

代码示例来源:origin: KrailOrg/krail

@Override
public void detach() {
  if (uiScope != null) {
    uiScope.releaseScope(instanceKey);
  }
  broadcaster.unregister(Broadcaster.ALL_MESSAGES, this);
  super.detach();
}

代码示例来源:origin: uk.q3c.krail/krail

@Override
public void detach() {
  if (uiScope != null) {
    uiScope.releaseScope(instanceKey);
  }
  broadcaster.unregister(Broadcaster.ALL_MESSAGES, this);
  super.detach();
}

相关文章