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


Java DataFieldBase類代碼示例

本文整理匯總了Java中org.kuali.rice.krad.uif.field.DataFieldBase的典型用法代碼示例。如果您正苦於以下問題:Java DataFieldBase類的具體用法?Java DataFieldBase怎麽用?Java DataFieldBase使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


DataFieldBase類屬於org.kuali.rice.krad.uif.field包,在下文中一共展示了DataFieldBase類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setup

import org.kuali.rice.krad.uif.field.DataFieldBase; //導入依賴的package包/類
@Before
public void setup() throws Throwable {
    richTable = new RichTable();

    richTable = spy(richTable);

    ConfigurationService configurationService = mock(ConfigurationService.class);
    doReturn(configurationService).when(richTable).getConfigurationService();

    group = new CollectionGroupBase();
    group.setCollectionObjectClass(Employee.class);

    TableLayoutManager layoutManager = new TableLayoutManagerBase();
    layoutManager.setRenderSequenceField(true);

    List<Component> items = new ArrayList<Component>(1);
    DataField name = new DataFieldBase();
    name.setPropertyName("employeeId");
    items.add(name);
    DataField number = new DataFieldBase();
    number.setPropertyName("positionTitle");
    items.add(number);
    DataField contactEmail = new DataFieldBase();
    contactEmail.setPropertyName("contactEmail");
    items.add(contactEmail);

    layoutManager = spy(layoutManager);
    doReturn(items).when(layoutManager).getFirstRowFields();
    doReturn(layoutManager).when(layoutManager).clone();

    group.setLayoutManager(layoutManager);
    group.setIncludeLineSelectionField(false);
    group.setRenderLineActions(false);

    group.setItems(items);

    mockView = mock(LookupView.class);
    ViewHelperService mockViewHelperService = mock(ViewHelperService.class);
    when(mockView.getViewHelperService()).thenReturn(mockViewHelperService);
    when(mockView.clone()).thenReturn(mockView);
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:42,代碼來源:RichTableTest.java


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