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


Java LightTable类代码示例

本文整理汇总了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);
        }
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:73,代码来源:GroupValidationMessages.java

示例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);
            }
        }
    }
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:60,代码来源:GroupValidationMessages.java


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