當前位置: 首頁>>代碼示例>>Java>>正文


Java ComponentFactory.getGroupWithDisclosureGridLayout方法代碼示例

本文整理匯總了Java中org.kuali.rice.krad.uif.util.ComponentFactory.getGroupWithDisclosureGridLayout方法的典型用法代碼示例。如果您正苦於以下問題:Java ComponentFactory.getGroupWithDisclosureGridLayout方法的具體用法?Java ComponentFactory.getGroupWithDisclosureGridLayout怎麽用?Java ComponentFactory.getGroupWithDisclosureGridLayout使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.kuali.rice.krad.uif.util.ComponentFactory的用法示例。


在下文中一共展示了ComponentFactory.getGroupWithDisclosureGridLayout方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: performCustomInitialization

import org.kuali.rice.krad.uif.util.ComponentFactory; //導入方法依賴的package包/類
@Override
public void performCustomInitialization(LifecycleElement component) {
    super.performCustomInitialization(component);

    if (component instanceof InquiryView) {
        InquiryView inquiryView = (InquiryView) component;
        PageGroup pageGroup = inquiryView.getCurrentPage();

        Group oldSection = (Group) pageGroup.getItems().get(0);
        oldSection.setHeaderText(oldSection.getHeaderText() + " - Customized");

        Group newSection = ComponentFactory.getGroupWithDisclosureGridLayout();
        newSection.setHeaderText("Dynamically Added Section");
        DataField newDataField = ComponentFactory.getDataField("newDataField", "Dynamically Added Field");
        newDataField.setForcedValue("This is a dynamically set value.");

        List<Component> fields = new ArrayList<Component>();
        fields.add(newDataField);
        newSection.setItems(fields);

        List<Component> sections = new ArrayList<Component>();
        sections.addAll(pageGroup.getItems());
        sections.add(newSection);
        pageGroup.setItems(sections);
    }

}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:28,代碼來源:LabsInquiryDynamicSectionsInquirable.java

示例2: testMutability

import org.kuali.rice.krad.uif.util.ComponentFactory; //導入方法依賴的package包/類
@SuppressWarnings("unchecked")
@Test
public void testMutability() throws Throwable {
    ViewService viewService = KRADServiceLocatorWeb.getViewService();
    View view = viewService.getViewById("DummyLoginView");

    Group group = ComponentFactory.getGroupWithDisclosureGridLayout();
    group.setId("foo");
    group.setHeaderText("bar");
    group.setItems(new ArrayList<Component>());

    ((List<Group>) view.getItems()).add(group);
    assertSame(group, view.getItems().get(view.getItems().size() - 1));
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:15,代碼來源:ViewLifecycleTest.java

示例3: createInquirySection

import org.kuali.rice.krad.uif.util.ComponentFactory; //導入方法依賴的package包/類
protected Group createInquirySection( String groupId, String headerText ) {
    Group group = ComponentFactory.getGroupWithDisclosureGridLayout();
    group.setId(groupId);
    group.setHeaderText(headerText);
    group.setItems(new ArrayList<Component>());
    return group;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:8,代碼來源:UifDefaultingServiceImpl.java


注:本文中的org.kuali.rice.krad.uif.util.ComponentFactory.getGroupWithDisclosureGridLayout方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。