本文整理匯總了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);
}
}
}