本文整理了Java中com.vaadin.ui.UI.doInit()
方法的一些代码示例,展示了UI.doInit()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。UI.doInit()
方法的具体详情如下:
包路径:com.vaadin.ui.UI
类名称:UI
方法名:doInit
[英]Internal initialization method, should not be overridden. This method is not declared as final because that would break compatibility with e.g. CDI.
[中]不应重写内部初始化方法。此方法未声明为最终方法,因为这将破坏与CDI等的兼容性。
代码示例来源:origin: com.vaadin/vaadin-server
ui.doInit(request, uiId.intValue(), embedId);
} catch (Exception e) {
initException = e;
代码示例来源:origin: com.holon-platform.vaadin7/holon-vaadin
/**
* Create a Vaadin UI using given UI class
* @param <T> UI type
* @param uiClass UI class to create
* @param location Page location
* @return UI instance
*/
@SuppressWarnings("unchecked")
protected <T extends UI> T createUi(Class<T> uiClass, String location) {
UICreateEvent evt = buildUiCreateEvent(uiClass, location);
T ui = (T) uiProvider.createInstance(evt);
CurrentInstance.set(UI.class, ui);
ui.doInit(evt.getRequest(), TEST_UIID, null);
return ui;
}
代码示例来源:origin: com.holon-platform.vaadin/holon-vaadin
/**
* Create a Vaadin UI using given UI class
* @param <T> UI type
* @param uiClass UI class to create
* @param location Page location
* @return UI instance
*/
@SuppressWarnings("unchecked")
protected <T extends UI> T createUi(Class<T> uiClass, String location) {
UICreateEvent evt = buildUiCreateEvent(uiClass, location);
T ui = (T) uiProvider.createInstance(evt);
CurrentInstance.set(UI.class, ui);
ui.doInit(evt.getRequest(), TEST_UIID, null);
return ui;
}
代码示例来源:origin: stackoverflow.com
ui.setSession(vaadinSession);
UI.setCurrent(ui);
ui.doInit(vaadinRequest, uiId, null);
vaadinSession.addUI(ui);
代码示例来源:origin: com.vaadin/hummingbird-server
protected UI createAndInitUI(Class<? extends UI> uiClass,
VaadinRequest request, VaadinSession session) {
Integer uiId = Integer.valueOf(session.getNextUIid());
UI ui = ReflectTools.createInstance(uiClass);
// Initialize some fields for a newly created UI
ui.getInternals().setSession(session);
PushMode pushMode = AnnotationReader.getPushMode(uiClass).orElseGet(
session.getService().getDeploymentConfiguration()::getPushMode);
ui.getPushConfiguration().setPushMode(pushMode);
AnnotationReader.getPushTransport(uiClass)
.ifPresent(ui.getPushConfiguration()::setTransport);
// Set thread local here so it is available in init
UI.setCurrent(ui);
ui.doInit(request, uiId.intValue());
session.addUI(ui);
return ui;
}
内容来源于网络,如有侵权,请联系作者删除!