本文整理汇总了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);
}
}
示例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);
}
}
}