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