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


Java ContainerBase类代码示例

本文整理汇总了Java中org.kuali.rice.krad.uif.container.ContainerBase的典型用法代码示例。如果您正苦于以下问题:Java ContainerBase类的具体用法?Java ContainerBase怎么用?Java ContainerBase使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ContainerBase类属于org.kuali.rice.krad.uif.container包,在下文中一共展示了ContainerBase类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addNestedGroupKeys

import org.kuali.rice.krad.uif.container.ContainerBase; //导入依赖的package包/类
/**
 * Adds all group keys of this component (starting from this component itself) by calling getKeys on each of
 * its nested group's ValidationMessages and adding them to the list.
 *
 * @param keyList
 * @param component
 */
protected void addNestedGroupKeys(Collection<String> keyList, Component component) {
    @SuppressWarnings("unchecked")
    Queue<LifecycleElement> elementQueue = RecycleUtils.getInstance(LinkedList.class);
    try {
        elementQueue.addAll(ViewLifecycleUtils.getElementsForLifecycle(component).values());
        while (!elementQueue.isEmpty()) {
            LifecycleElement element = elementQueue.poll();

            ValidationMessages ef = null;
            if (element instanceof ContainerBase) {
                ef = ((ContainerBase) element).getValidationMessages();
            } else if (element instanceof FieldGroup) {
                ef = ((FieldGroup) element).getGroup().getValidationMessages();
            }
            
            if (ef != null) {
                keyList.addAll(ef.getKeys((Component) element));
            }

            elementQueue.addAll(ViewLifecycleUtils.getElementsForLifecycle(element).values());
        }
    } finally {
        elementQueue.clear();
        RecycleUtils.recycle(elementQueue);
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:34,代码来源:ValidationMessages.java

示例2: addNestedGroupKeys

import org.kuali.rice.krad.uif.container.ContainerBase; //导入依赖的package包/类
/**
 * Adds all group keys of this component (starting from this component itself) by calling getKeys on each of
 * its nested group's ValidationMessages and adding them to the list.
 *
 * @param keyList
 * @param component
 */
private void addNestedGroupKeys(Collection<String> keyList, Component component) {
    for (Component c : component.getComponentsForLifecycle()) {
        ValidationMessages ef = null;
        if (c instanceof ContainerBase) {
            ef = ((ContainerBase) c).getValidationMessages();
        } else if (c instanceof FieldGroup) {
            ef = ((FieldGroup) c).getGroup().getValidationMessages();
        }
        if (ef != null) {
            keyList.addAll(ef.getKeys(c));
            addNestedGroupKeys(keyList, c);
        }
    }
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:22,代码来源:ValidationMessages.java


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