当前位置: 首页>>代码示例>>Java>>正文


Java AppBeans.getPrototype方法代码示例

本文整理汇总了Java中com.haulmont.cuba.core.global.AppBeans.getPrototype方法的典型用法代码示例。如果您正苦于以下问题:Java AppBeans.getPrototype方法的具体用法?Java AppBeans.getPrototype怎么用?Java AppBeans.getPrototype使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.haulmont.cuba.core.global.AppBeans的用法示例。


在下文中一共展示了AppBeans.getPrototype方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: openUrl

import com.haulmont.cuba.core.global.AppBeans; //导入方法依赖的package包/类
protected void openUrl(Entity entity) {
    ScreenHistoryEntity screenHistoryEntity = (ScreenHistoryEntity) entity;
    Map<String, String> paramsScreen = new HashMap<>();
    String url = screenHistoryEntity.getUrl();
    url = url.substring(url.indexOf("\u003f") + 1);
    paramsScreen.put("local", "true");
    String[] params =  url.split("&");
    for (String param : params) {
        String name = param.split("=")[0];
        String value = param.split("=")[1];
        paramsScreen.put(name, value);
    }

    List<String> actions = configuration.getConfig(WebConfig.class).getLinkHandlerActions();
    LinkHandler linkHandler = AppBeans.getPrototype(LinkHandler.NAME,
            App.getInstance(),
            actions.isEmpty() ? "open" : actions.get(0),
            paramsScreen);
    if (linkHandler.canHandleLink()) {
        linkHandler.handle();
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:23,代码来源:ScreenHistoryBrowse.java

示例2: addCondition

import com.haulmont.cuba.core.global.AppBeans; //导入方法依赖的package包/类
/**
 * Opens AddCondition window. When condition is selected/created a {@code Handler#handle} method will be called
 *
 * @param conditionsTree conditions tree is necessary for custom condition editing. It is used for suggestion of
 *                       other component names in 'param where' field.
 */
public void addCondition(final ConditionsTree conditionsTree) {
    Map<String, Object> params = new HashMap<>();
    ConditionDescriptorsTreeBuilderAPI descriptorsTreeBuilder = AppBeans.getPrototype(ConditionDescriptorsTreeBuilderAPI.NAME,
            filter,
            PROPERTIES_HIERARCHY_DEPTH,
            hideDynamicAttributes,
            hideCustomConditions,
            conditionsTree);
    Tree<AbstractConditionDescriptor> descriptorsTree = descriptorsTreeBuilder.build();
    params.put("descriptorsTree", descriptorsTree);
    WindowInfo windowInfo = windowConfig.getWindowInfo("addCondition");
    AddConditionWindow window = (AddConditionWindow) windowManager.openWindow(windowInfo, WindowManager.OpenType.DIALOG, params);
    window.addCloseListener(actionId -> {
        if (Window.COMMIT_ACTION_ID.equals(actionId)) {
            Collection<AbstractConditionDescriptor> descriptors = window.getDescriptors();
            if (descriptors != null) {
                for (AbstractConditionDescriptor descriptor : descriptors) {
                    _addCondition(descriptor, conditionsTree);
                }
            }
        }
    });
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:30,代码来源:AddConditionHelper.java

示例3: processExternalLink

import com.haulmont.cuba.core.global.AppBeans; //导入方法依赖的package包/类
@Override
public void processExternalLink(VaadinRequest request) {
    WrappedSession wrappedSession = request.getWrappedSession();
    String action = (String) wrappedSession.getAttribute(LAST_REQUEST_ACTION_ATTR);
    if (NexbitLinkHandler.RESET_ACTION.equals(action)) {
        //noinspection unchecked
        Map<String, String> params =
                (Map<String, String>) wrappedSession.getAttribute(LAST_REQUEST_PARAMS_ATTR);
        if (params == null) {
            log.warn("Unable to process the external link: lastRequestParams not found in session");
            return;
        }

        try {
            LinkHandler linkHandler = AppBeans.getPrototype(LinkHandler.NAME, app, action, params);
            if (((NexbitLinkHandler)linkHandler).canHandleLink(action, params)) {
                linkHandler.handle();
                wrappedSession.setAttribute(LAST_REQUEST_ACTION_ATTR, null);
                return;
            }
        } catch (Exception e) {
            error(new com.vaadin.server.ErrorEvent(e));
        }
    }

    super.processExternalLink(request);
}
 
开发者ID:pfurini,项目名称:cuba-component-forgot-password,代码行数:28,代码来源:NexbitAppUI.java

示例4: navigateTo

import com.haulmont.cuba.core.global.AppBeans; //导入方法依赖的package包/类
/**
 * Initialize new TopLevelWindow and replace current
 *
 * @param topLevelWindowId target top level window id
 */
public void navigateTo(String topLevelWindowId) {
    WebWindowManager wm = AppBeans.getPrototype(WebWindowManager.NAME);
    wm.setUi(AppUI.getCurrent());

    wm.createTopLevelWindow(windowConfig.getWindowInfo(topLevelWindowId));
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:12,代码来源:App.java

示例5: generateInsertScript

import com.haulmont.cuba.core.global.AppBeans; //导入方法依赖的package包/类
@Override
public String generateInsertScript(Entity entity) {
    Preconditions.checkNotNullArgument(entity);
    EntitySqlGenerator generator = AppBeans.getPrototype(EntitySqlGenerator.NAME, entity.getClass());
    entity = reload(entity);

    return generator.generateInsertScript(entity);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:9,代码来源:EntitySqlGenerationServiceBean.java

示例6: generateUpdateScript

import com.haulmont.cuba.core.global.AppBeans; //导入方法依赖的package包/类
@Override
public String generateUpdateScript(Entity entity) {
    Preconditions.checkNotNullArgument(entity);
    EntitySqlGenerator generator = AppBeans.getPrototype(EntitySqlGenerator.NAME, entity.getClass());
    entity = reload(entity);
    return generator.generateUpdateScript(entity);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:8,代码来源:EntitySqlGenerationServiceBean.java

示例7: createInstance

import com.haulmont.cuba.core.global.AppBeans; //导入方法依赖的package包/类
@Override
public UI createInstance(UICreateEvent event) {
    return AppBeans.getPrototype(AppUI.NAME);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:5,代码来源:CubaUIProvider.java

示例8: createConnection

import com.haulmont.cuba.core.global.AppBeans; //导入方法依赖的package包/类
protected Connection createConnection() {
    return AppBeans.getPrototype(Connection.NAME);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:4,代码来源:App.java

示例9: loadMenu

import com.haulmont.cuba.core.global.AppBeans; //导入方法依赖的package包/类
@Override
public void loadMenu() {
    MenuBuilder menuBuilder = AppBeans.getPrototype(MenuBuilder.NAME);
    menuBuilder.build(this);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:6,代码来源:WebAppMenu.java

示例10: loadMenuConfig

import com.haulmont.cuba.core.global.AppBeans; //导入方法依赖的package包/类
@Override
public void loadMenuConfig() {
    SideMenuBuilder menuBuilder = AppBeans.getPrototype(SideMenuBuilder.NAME);
    menuBuilder.build(this);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:6,代码来源:WebSideMenu.java

示例11: generateSelectScript

import com.haulmont.cuba.core.global.AppBeans; //导入方法依赖的package包/类
@Override
public String generateSelectScript(Entity entity) {
    Preconditions.checkNotNullArgument(entity);
    EntitySqlGenerator generator = AppBeans.getPrototype(EntitySqlGenerator.NAME, entity.getClass());
    return generator.generateSelectScript(entity);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:7,代码来源:EntitySqlGenerationServiceBean.java

示例12: create

import com.haulmont.cuba.core.global.AppBeans; //导入方法依赖的package包/类
/**
 * Creates an action with default id. Autocommit is set to true.
 * @param target    component containing this action
 */
public static RemoveAction create(ListComponent target) {
    return AppBeans.getPrototype("cuba_RemoveAction", target);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:8,代码来源:RemoveAction.java

示例13: create

import com.haulmont.cuba.core.global.AppBeans; //导入方法依赖的package包/类
/**
 * Creates an action with the given id.
 * @param target    component containing this action
 */
public static RelatedAction create(String id, ListComponent target, MetaClass metaClass, MetaProperty metaProperty) {
    return AppBeans.getPrototype("cuba_RelatedAction", id, target, metaClass, metaProperty);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:8,代码来源:RelatedAction.java

示例14: create

import com.haulmont.cuba.core.global.AppBeans; //导入方法依赖的package包/类
/**
 * Creates an action with default id.
 * @param target    component containing this action
 * @param openType  how to open the editor screen
 */
public static EditAction create(ListComponent target, OpenType openType) {
    return AppBeans.getPrototype("cuba_EditAction", target, openType);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:9,代码来源:EditAction.java

示例15: create

import com.haulmont.cuba.core.global.AppBeans; //导入方法依赖的package包/类
/**
 * Creates an action with default id.
 * @param target    component containing this action
 */
public static BulkEditAction create(ListComponent target) {
    return AppBeans.getPrototype("cuba_BulkEditAction", target);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:8,代码来源:BulkEditAction.java


注:本文中的com.haulmont.cuba.core.global.AppBeans.getPrototype方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。