當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。