本文整理汇总了Java中org.kuali.rice.krad.util.KRADConstants.DEFAULT_NUM_OF_COLUMNS属性的典型用法代码示例。如果您正苦于以下问题:Java KRADConstants.DEFAULT_NUM_OF_COLUMNS属性的具体用法?Java KRADConstants.DEFAULT_NUM_OF_COLUMNS怎么用?Java KRADConstants.DEFAULT_NUM_OF_COLUMNS使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.kuali.rice.krad.util.KRADConstants
的用法示例。
在下文中一共展示了KRADConstants.DEFAULT_NUM_OF_COLUMNS属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setRows
/**
* Sets the rows for the search criteria. This method will delegate to the DocumentSearchCriteriaProcessor
* in order to pull in fields for custom search attributes.
*
* @param documentTypeName the name of the document type currently entered on the form, if this is a valid document
* type then it may have search attribute fields that need to be displayed; documentType name may also be loaded
* via a saved search
*/
protected void setRows(String documentTypeName) {
// Always call superclass to regenerate the rows since state may have changed (namely, documentTypeName parsed from params)
super.setRows();
List<Row> lookupRows = new ArrayList<Row>();
//copy the current rows
for (Row row : getRows()) {
lookupRows.add(row);
}
//clear out
getRows().clear();
DocumentType docType = getValidDocumentType(documentTypeName);
boolean advancedSearch = isAdvancedSearch();
boolean superUserSearch = isSuperUserSearch();
//call get rows
List<Row> rows = getDocumentSearchCriteriaProcessor().getRows(docType,lookupRows, advancedSearch, superUserSearch);
BusinessObjectEntry boe = (BusinessObjectEntry) KRADServiceLocatorWeb.getDataDictionaryService().getDataDictionary().getBusinessObjectEntry(this.getBusinessObjectClass().getName());
int numCols = boe.getLookupDefinition().getNumOfColumns();
if(numCols == 0) {
numCols = KRADConstants.DEFAULT_NUM_OF_COLUMNS;
}
super.getRows().addAll(FieldUtils.wrapFields(new FormFields(rows).getFieldList(), numCols));
}