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


Java Row.setHidden方法代码示例

本文整理汇总了Java中org.kuali.rice.kns.web.ui.Row.setHidden方法的典型用法代码示例。如果您正苦于以下问题:Java Row.setHidden方法的具体用法?Java Row.setHidden怎么用?Java Row.setHidden使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.kuali.rice.kns.web.ui.Row的用法示例。


在下文中一共展示了Row.setHidden方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addHiddenFields

import org.kuali.rice.kns.web.ui.Row; //导入方法依赖的package包/类
protected void addHiddenFields(List<Row> rows, boolean advancedSearch, boolean superUserSearch) {
    Row hiddenRow = new Row();
    hiddenRow.setHidden(true);

    Field detailedField = new Field();
    detailedField.setPropertyName(KRADConstants.ADVANCED_SEARCH_FIELD);
    detailedField.setPropertyValue(advancedSearch ? "YES" : "NO");
    detailedField.setFieldType(Field.HIDDEN);

    Field superUserSearchField = new Field();
    superUserSearchField.setPropertyName(SUPERUSER_SEARCH_FIELD);
    superUserSearchField.setPropertyValue(superUserSearch ? "YES" : "NO");
    superUserSearchField.setFieldType(Field.HIDDEN);

    Field clearSavedSearchField = new Field();
    clearSavedSearchField .setPropertyName(CLEARSAVED_SEARCH_FIELD);
    clearSavedSearchField .setPropertyValue(superUserSearch ? "YES" : "NO");
    clearSavedSearchField .setFieldType(Field.HIDDEN);

    List<Field> hiddenFields = new ArrayList<Field>();
    hiddenFields.add(detailedField);
    hiddenFields.add(superUserSearchField);
    hiddenFields.add(clearSavedSearchField);
    hiddenRow.setFields(hiddenFields);
    rows.add(hiddenRow);

}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:28,代码来源:DocumentSearchCriteriaProcessorKEWAdapter.java

示例2: createFieldRowsForWorkflowAttributes

import org.kuali.rice.kns.web.ui.Row; //导入方法依赖的package包/类
protected List<Row> createFieldRowsForWorkflowAttributes(WorkflowAttributes attrs) {
    List<Row> searchFields = new ArrayList<Row>();

    List<SearchingTypeDefinition> searchingTypeDefinitions = attrs.getSearchingTypeDefinitions();
    final WorkflowAttributePropertyResolutionService propertyResolutionService = KNSServiceLocator
            .getWorkflowAttributePropertyResolutionService();
    for (SearchingTypeDefinition definition: searchingTypeDefinitions) {
        SearchingAttribute attr = definition.getSearchingAttribute();

        final String attributeName = attr.getAttributeName();
        final String businessObjectClassName = attr.getBusinessObjectClassName();
        Class boClass = null;
        Object businessObject  = null;
        try {
            boClass = Class.forName(businessObjectClassName);
            businessObject = (Object)boClass.newInstance();
        } catch (Exception e) {
            throw new RuntimeException(e);
        }

        Field searchField = FieldUtils.getPropertyField(boClass, attributeName, false);
        // prepend all document attribute field names with "documentAttribute."
        //searchField.setPropertyName(KewApiConstants.DOCUMENT_ATTRIBUTE_FIELD_PREFIX + searchField.getPropertyName());
        searchField.setColumnVisible(attr.isShowAttributeInResultSet());

        //TODO this is a workaround to hide the Field from the search criteria.
        //This should be removed once hiding the entire Row is working
        if (!attr.isShowAttributeInSearchCriteria()){
            searchField.setFieldType(Field.HIDDEN);
        }
        String fieldDataType = propertyResolutionService.determineFieldDataType(boClass, attributeName);
        if (fieldDataType.equals(DataDictionarySearchableAttribute.DATA_TYPE_BOOLEAN)) {
            fieldDataType = KewApiConstants.SearchableAttributeConstants.DATA_TYPE_STRING;
        }

        // Allow inline range searching on dates and numbers
        if (fieldDataType.equals(KewApiConstants.SearchableAttributeConstants.DATA_TYPE_FLOAT) ||
            fieldDataType.equals(KewApiConstants.SearchableAttributeConstants.DATA_TYPE_LONG) ||
            fieldDataType.equals(KewApiConstants.SearchableAttributeConstants.DATA_TYPE_DATE)) {

            searchField.setAllowInlineRange(true);
        }
        searchField.setFieldDataType(fieldDataType);
        List displayedFieldNames = new ArrayList();
        displayedFieldNames.add(attributeName);
        LookupUtils.setFieldQuickfinder(businessObject, attributeName, searchField, displayedFieldNames);

        List<Field> fieldList = new ArrayList<Field>();
        fieldList.add(searchField);

        Row row = new Row(fieldList);
        if (!attr.isShowAttributeInSearchCriteria()) {
            row.setHidden(true);
        }
        searchFields.add(row);
    }

    return searchFields;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:60,代码来源:DataDictionarySearchableAttribute.java


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