本文整理了Java中com.haulmont.cuba.gui.config.WindowConfig.getLookupScreen()
方法的一些代码示例,展示了WindowConfig.getLookupScreen()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WindowConfig.getLookupScreen()
方法的具体详情如下:
包路径:com.haulmont.cuba.gui.config.WindowConfig
类名称:WindowConfig
方法名:getLookupScreen
[英]Get available lookup screen by class of entity
[中]按实体类别获取可用的查找屏幕
代码示例来源:origin: com.haulmont.cuba/cuba-gui
/**
* Open a lookup screen.
*
* @param entityClass required class of entity
* @param handler is invoked when selection confirmed and the lookup screen closes
* @param openType how to open the screen
* @return created window
*
* @deprecated Use {@link ScreenBuilders} bean instead.
*/
@Deprecated
default AbstractLookup openLookup(Class<? extends Entity> entityClass, Window.Lookup.Handler handler,
WindowManager.OpenType openType) {
WindowConfig windowConfig = AppBeans.get(WindowConfig.NAME);
WindowInfo lookupScreen = windowConfig.getLookupScreen(entityClass);
return (AbstractLookup) getWindowManager().openLookup(lookupScreen, handler, openType);
}
代码示例来源:origin: com.haulmont.cuba/cuba-gui
/**
* Open a lookup screen.
*
* @param entityClass required class of entity
* @param handler is invoked when selection confirmed and the lookup screen closes
* @param openType how to open the screen
* @param params parameters to pass to {@code init()} method of the screen's controller
* @return created window
*
* @deprecated Use {@link ScreenBuilders} bean instead.
*/
@Deprecated
default AbstractLookup openLookup(Class<? extends Entity> entityClass, Window.Lookup.Handler handler,
WindowManager.OpenType openType, Map<String, Object> params) {
WindowConfig windowConfig = AppBeans.get(WindowConfig.NAME);
WindowInfo lookupScreen = windowConfig.getLookupScreen(entityClass);
return (AbstractLookup) getWindowManager().openLookup(lookupScreen, handler, openType, params);
}
代码示例来源:origin: com.haulmont.cuba/cuba-web
protected String getLookupScreenInternal() {
return StringUtils.isNotEmpty(getLookupScreen())
? getLookupScreen()
: windowConfig.getLookupScreen(getLookupEntityClass()).getId();
}
代码示例来源:origin: com.haulmont.cuba/cuba-gui
protected <E extends Entity> Screen createScreen(LookupBuilder<E> builder, Screens screens) {
Screen screen;
if (builder instanceof LookupClassBuilder) {
LookupClassBuilder lookupClassBuilder = (LookupClassBuilder) builder;
@SuppressWarnings("unchecked")
Class<? extends Screen> screenClass = lookupClassBuilder.getScreenClass();
if (screenClass == null) {
throw new IllegalArgumentException("Screen class is not set");
}
screen = screens.create(screenClass, builder.getLaunchMode(), builder.getOptions());
} else {
String lookupScreenId;
if (builder.getScreenId() != null) {
lookupScreenId = builder.getScreenId();
} else {
lookupScreenId = windowConfig.getLookupScreen(builder.getEntityClass()).getId();
}
if (lookupScreenId == null) {
throw new IllegalArgumentException("Screen id is not set");
}
screen = screens.create(lookupScreenId, builder.getLaunchMode(), builder.getOptions());
}
return screen;
}
内容来源于网络,如有侵权,请联系作者删除!