本文整理汇总了Java中org.kuali.rice.krad.uif.container.LightTable类的典型用法代码示例。如果您正苦于以下问题:Java LightTable类的具体用法?Java LightTable怎么用?Java LightTable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LightTable类属于org.kuali.rice.krad.uif.container包,在下文中一共展示了LightTable类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: collectIdsFromItems
import org.kuali.rice.krad.uif.container.LightTable; //导入依赖的package包/类
/**
* Collects all the ids from the items passed into this method.
*
* <p>Puts the ids of items determined to be sections
* into the sectionIds list, and orders all items by the order they appear on the page in the order list with
* special identifiers
* to determine the type of item they are (used by the client js). When skipSections is true do not
* include sectionIds found in the lists.</p>
*
* @param items items of the group
* @param sectionIds list to put section ids into
* @param order list to put order of ids into (both fields and sections)
* @param skipSections skip adding sections
*/
protected void collectIdsFromItems(List<? extends Component> items, List<String> sectionIds, List<String> order,
boolean skipSections) {
if (items == null) {
return;
}
for (Component component : items) {
String id = StringUtils.replace(component.getId(), "@[email protected]", "");
if (component instanceof FieldGroup) {
boolean treatFieldGroupAsSection = ((FieldGroup) component).getFieldLabel().isRender() &&
!((FieldGroup) component).getFieldLabel().isHidden() &&
(StringUtils.isNotEmpty(((FieldGroup) component).getLabel()) || StringUtils.isNotEmpty(
((FieldGroup) component).getFieldLabel().getLabelText()));
if (!skipSections && treatFieldGroupAsSection) {
sectionIds.add(id);
// Add with field group identifier
order.add(FIELDGROUP_TOKEN + id);
continue;
} else {
component = ((FieldGroup) component).getGroup();
if (component == null) {
continue;
}
}
}
// Not an 'else if' because component being evaluated can change to container above^
if (component instanceof Container) {
id = StringUtils.replace(component.getId(), "@[email protected]", "");
//If any kind of header text is showing consider this group a section
boolean isSection =
((Container) component).getHeader() != null && ((Container) component).getHeader().isRender()
&& (StringUtils.isNotBlank(((Container) component).getHeader().getHeaderText())
|| StringUtils.isNotBlank(component.getTitle()));
if (!skipSections && isSection) {
sectionIds.add(id);
// Add with section identifier
order.add(SECTION_TOKEN + id);
} else if ((component instanceof CollectionGroup && ((CollectionGroup) component)
.getLayoutManager() instanceof TableLayoutManager) || component instanceof LightTable) {
// Add with collection identifier
order.add(TABLE_COLLECTION_TOKEN + id);
} else {
// If a non-section container, collect ids from sub items
collectIdsFromItems(((Container) component).getItems(), sectionIds, order, skipSections);
}
} else if (component instanceof InputField) {
order.add(id);
}
}
}
示例2: collectIdsFromItems
import org.kuali.rice.krad.uif.container.LightTable; //导入依赖的package包/类
/**
* Collects all the ids from the items passed into this method.
*
* <p>Puts the ids of items determined to be sections
* into the sectionIds list, and orders all items by the order they appear on the page in the order list with
* special identifiers
* to determine the type of item they are (used by the client js). When skipSections is true do not
* include sectionIds found in the lists.</p>
*
* @param items items of the group
* @param sectionIds list to put section ids into
* @param order list to put order of ids into (both fields and sections)
* @param skipSections skip adding sections
*/
protected void collectIdsFromItems(List<? extends Component> items, List<String> sectionIds, List<String> order,
boolean skipSections) {
if (items != null) {
for (Component component : items) {
String id = component.getId().replace("@[email protected]", "");
if (component instanceof Container || component instanceof FieldGroup) {
if (component instanceof FieldGroup) {
if (!skipSections &&
((FieldGroup) component).getFieldLabel().isRender() &&
!((FieldGroup) component).getFieldLabel().isHidden() &&
(StringUtils.isNotEmpty(((FieldGroup) component).getLabel()) || StringUtils.isNotEmpty(
((FieldGroup) component).getFieldLabel().getLabelText()))) {
sectionIds.add(id);
order.add(FIELDGROUP_TOKEN + id);
continue;
} else {
component = ((FieldGroup) component).getGroup();
if (component == null) {
continue;
}
}
}
//If any kind of header text is showing consider this group a section
if (!skipSections
&& ((Container) component).getHeader() != null
&& ((Container) component).getHeader().isRender()
&& (StringUtils.isNotBlank(((Container) component).getHeader().getHeaderText()) || StringUtils
.isNotBlank(component.getTitle()))) {
sectionIds.add(id);
order.add(SECTION_TOKEN + id);
} else if ((component instanceof CollectionGroup
&& ((CollectionGroup) component).getLayoutManager() instanceof TableLayoutManager)
|| component instanceof LightTable){
order.add(TABLE_COLLECTION_TOKEN + id);
} else {
collectIdsFromItems(((Container) component).getItems(), sectionIds, order, skipSections);
}
} else if (component instanceof InputField) {
order.add(id);
}
}
}
}