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


Java Row.getFields方法代码示例

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


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

示例1: addRowsToErrorKeySet

import org.kuali.rice.kns.web.ui.Row; //导入方法依赖的package包/类
/**
 * This method recurses through all the fields of the list of rows and adds each field's property name to the set if it starts
 * with Constants.MAINTENANCE_NEW_MAINTAINABLE
 *
 * @param listOfRows
 * @param errorKeys
 * @see KRADConstants#MAINTENANCE_NEW_MAINTAINABLE
 */
protected static void addRowsToErrorKeySet(List<Row> listOfRows, Set<String> errorKeys) {
    if (listOfRows == null) {
        return;
    }
    for (Row row : listOfRows) {
        List<Field> fields = row.getFields();
        if (fields == null) {
            continue;
        }
        for (Field field : fields) {
            String fieldPropertyName = field.getPropertyName();
            if (fieldPropertyName != null && fieldPropertyName.startsWith(KRADConstants.MAINTENANCE_NEW_MAINTAINABLE)) {
                errorKeys.add(field.getPropertyName());
            }
            addRowsToErrorKeySet(field.getContainerRows(), errorKeys);
        }
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:27,代码来源:MaintenanceUtils.java

示例2: transformFieldConversions

import org.kuali.rice.kns.web.ui.Row; //导入方法依赖的package包/类
public static void transformFieldConversions(List<Row> rows, Map<String, String> fieldNameMap) {
	for (Row row : rows) {
		Map<String, String> transformedFieldConversions = new HashMap<String, String>();
		for (Field field : row.getFields()) {
			Map<String, String> fieldConversions = field.getFieldConversionMap();
			for (String lookupFieldName : fieldConversions.keySet()) {
				String localFieldName = fieldConversions.get(lookupFieldName);
				if (fieldNameMap.containsKey(localFieldName)) {
					// set the transformed value
					transformedFieldConversions.put(lookupFieldName, fieldNameMap.get(localFieldName));
				} else {
					// set the original value (not sure if this case will happen, but just in case)
					transformedFieldConversions.put(lookupFieldName, fieldConversions.get(lookupFieldName));
				}
			}
			field.setFieldConversions(transformedFieldConversions);
		}
	}
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:20,代码来源:WebRuleUtils.java

示例3: transformAndPopulateAttributeRows

import org.kuali.rice.kns.web.ui.Row; //导入方法依赖的package包/类
/**
 * Processes the Fields on the various attributes Rows to assign an appropriate field name to them so that the
 * field name rendered in the maintenance HTML will properly assign the value to RuleBaseValues.fieldValues.
 */

public static List<Row> transformAndPopulateAttributeRows(List<Row> attributeRows, RuleTemplateAttributeBo ruleTemplateAttribute, RuleBaseValues rule, Map<String, String> fieldNameMap, boolean delegateRule) {

	for (Row row : attributeRows) {
		for (Field field : row.getFields()) {
			String fieldName = field.getPropertyName();
			if (!StringUtils.isBlank(fieldName)) {
				String valueKey = ruleTemplateAttribute.getId() + ID_SEPARATOR + fieldName;

				String propertyName;

				if (delegateRule) {
                       propertyName = "delegationRule.fieldValues(" + valueKey + ")";
                   } else {
					propertyName = "fieldValues(" + valueKey + ")";
				}

				fieldNameMap.put(fieldName, propertyName);
				field.setPropertyName(propertyName);
				field.setPropertyValue(rule.getFieldValues().get(valueKey));
			}
		}
	}
	return attributeRows;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:30,代码来源:WebRuleUtils.java

示例4: loadFields

import org.kuali.rice.kns.web.ui.Row; //导入方法依赖的package包/类
private void loadFields() {
	fields.clear();
	if (getRuleTemplateId() != null) {
		RuleTemplateBo ruleTemplate = getRuleTemplateService().findByRuleTemplateId(getRuleTemplateId());
		if (ruleTemplate != null) {
			List ruleTemplateAttributes = ruleTemplate.getActiveRuleTemplateAttributes();
			Collections.sort(ruleTemplateAttributes);
			for (Iterator iter = ruleTemplateAttributes.iterator(); iter.hasNext();) {
				RuleTemplateAttributeBo ruleTemplateAttribute = (RuleTemplateAttributeBo) iter.next();
				if (!ruleTemplateAttribute.isWorkflowAttribute()) {
					continue;
				}
                WorkflowRuleAttributeRows workflowRuleAttributeRows =
                        KEWServiceLocator.getWorkflowRuleAttributeMediator().getRuleRows(null, ruleTemplateAttribute);
				for (Row row : workflowRuleAttributeRows.getRows()) {
					for (Field field : row.getFields()) {
                           String fieldValue = "";
                           RuleExtensionValue extensionValue = getRuleExtensionValue(ruleTemplateAttribute.getId(), field.getPropertyName());
                           fieldValue = (extensionValue != null) ? extensionValue.getValue() : field.getPropertyValue();
                           fields.add(new KeyValueId(field.getPropertyName(), fieldValue, ruleTemplateAttribute.getId()));
                       }
				}
			}
		}
	}
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:27,代码来源:WebRuleBaseValues.java

示例5: getColumns

import org.kuali.rice.kns.web.ui.Row; //导入方法依赖的package包/类
@Override
public List<Column> getColumns() {
    List<Column> columns = new ArrayList<Column>();
    for (Row row : this.getRows()) {
        for (Field field : row.getFields()) {
            Column newColumn = new Column();
            newColumn.setColumnTitle(field.getFieldLabel());
            newColumn.setMaxLength(field.getMaxLength());
            newColumn.setPropertyName(field.getPropertyName());
            columns.add(newColumn);

        }

    }

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

示例6: getSections

import org.kuali.rice.kns.web.ui.Row; //导入方法依赖的package包/类
/**
 * Override the getSections method on this maintainable so that the document type name field
 * can be set to read-only for 
 */
@Override
public List getSections(MaintenanceDocument document, Maintainable oldMaintainable) {
    List<Section> sections = super.getSections(document, oldMaintainable);
    // if the document isn't new then we need to make the document type name field read-only
    if (!document.isNew()) {
        sectionLoop: for (Section section : sections) {
            for (Row row : section.getRows()) {
                for (Field field : row.getFields()) {
                    if (KEWPropertyConstants.NAME.equals(field.getPropertyName())) {
                        field.setReadOnly(true);
                        break sectionLoop;
                    }
                }
            }
        }
    }
    return sections;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:23,代码来源:DocumentTypeMaintainable.java

示例7: getSections

import org.kuali.rice.kns.web.ui.Row; //导入方法依赖的package包/类
/**
 * Overridden to take out details with inactive categories
 * @see org.kuali.rice.kns.inquiry.KualiInquirableImpl#getSections(org.kuali.rice.krad.bo.BusinessObject)
 * 
 * KRAD Conversion: Inquirable performs conditional display/hiding of the fields/sections on the inquiry
 * But all field/section definitions are in data dictionary for bo Organization.
 */
@Override
public List<Section> getSections(BusinessObject bo) {
    List<Section> sections = super.getSections(bo);
    if (organizationReversionService == null) {
        organizationReversionService = SpringContext.getBean(OrganizationReversionService.class);
    }
    for (Section section : sections) {
        for (Row row : section.getRows()) {
            List<Field> updatedFields = new ArrayList<Field>();
            for (Field field : row.getFields()) {
                if (shouldIncludeField(field)) {
                    updatedFields.add(field);
                }
            }
            row.setFields(updatedFields);
        }
    }
    return sections;
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:27,代码来源:OrganizationReversionInquirable.java

示例8: getSelectedPaths

import org.kuali.rice.kns.web.ui.Row; //导入方法依赖的package包/类
/**
 * KRAD Conversion: gets rows after customizing the field values
 * 
 * No use of data dictionary
 */
protected String[] getSelectedPaths() {
    List<Row> rows = getRows();
    if (rows == null) {
        return null;
    }
    for (Row row : rows) {
        for (Field field : row.getFields()) {
            if ("path".equals(field.getPropertyName()) && Field.MULTISELECT.equals(field.getFieldType())) {
                String[] values = field.getPropertyValues();
                return values;
            }
        }
    }
    return null;
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:21,代码来源:BatchFileLookupableHelperServiceImpl.java

示例9: testGetSections_OrgHier_RoleMember_New

import org.kuali.rice.kns.web.ui.Row; //导入方法依赖的package包/类
@Test
public void testGetSections_OrgHier_RoleMember_New() throws Exception {
    MaintenanceDocument document = createNewDocument_RoleMember();

    // populate the old side (should be blank)
    List<Section> oldSections = document.getNewMaintainableObject().getSections(document, null);

    // populate the new side
    List<Section> newSections = document.getNewMaintainableObject().getSections(document, document.getNewMaintainableObject());
    for ( Section section : newSections ) {
        for ( Row row : section.getRows() ) {
            for ( Field field : row.getFields() ) {
                if ( ArrayUtils.contains(FIELDS_TO_IGNORE, field.getPropertyName()) ) {
                    continue;
                }
                if ( field.getPropertyName().equals(OrgReviewRole.DELEGATION_TYPE_CODE) ) {
                    assertEquals( "Delegation type Field should have been hidden: ", Field.HIDDEN, field.getFieldType() );
                } else {
                    assertFalse( field.getPropertyName() + " should have been editable and not hidden", field.isReadOnly() || field.getFieldType().equals(Field.HIDDEN) );
                }
            }
        }
    }
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:25,代码来源:OrgReviewRoleMaintainableImplTest.java

示例10: testGetSections_OrgHier_RoleMember_Copy

import org.kuali.rice.kns.web.ui.Row; //导入方法依赖的package包/类
@Test
public void testGetSections_OrgHier_RoleMember_Copy() throws Exception {
    orgReviewRoleService.saveOrgReviewRoleToKim(orgHierOrgReviewRole);
    MaintenanceDocument document = createCopyDocument_OrgHier_RoleMember(orgHierOrgReviewRole.getRoleMemberId());

    // populate the old side (should be blank)
    List<Section> oldSections = document.getNewMaintainableObject().getSections(document, null);

    // populate the new side
    List<Section> newSections = document.getNewMaintainableObject().getSections(document, document.getNewMaintainableObject());
    for ( Section section : newSections ) {
        for ( Row row : section.getRows() ) {
            for ( Field field : row.getFields() ) {
                if ( ArrayUtils.contains(FIELDS_TO_IGNORE, field.getPropertyName()) ) {
                    continue;
                }
                if ( field.getPropertyName().equals(OrgReviewRole.DELEGATION_TYPE_CODE) ) {
                    assertEquals( "Delegation type Field should have been hidden: ", Field.HIDDEN, field.getFieldType() );
                } else {
                    assertFalse( field.getPropertyName() + " should have been editable and not hidden", field.isReadOnly() || field.getFieldType().equals(Field.HIDDEN) );
                }
            }
        }
    }
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:26,代码来源:OrgReviewRoleMaintainableImplTest.java

示例11: testGetSections_OrgHier_RoleMember_New

import org.kuali.rice.kns.web.ui.Row; //导入方法依赖的package包/类
public void testGetSections_OrgHier_RoleMember_New() throws Exception {
    MaintenanceDocument document = createNewDocument_RoleMember();

    // populate the old side (should be blank)
    List<Section> oldSections = document.getNewMaintainableObject().getSections(document, null);

    // populate the new side
    List<Section> newSections = document.getNewMaintainableObject().getSections(document, document.getNewMaintainableObject());
    for ( Section section : newSections ) {
        for ( Row row : section.getRows() ) {
            for ( Field field : row.getFields() ) {
                if ( ArrayUtils.contains(FIELDS_TO_IGNORE, field.getPropertyName()) ) {
                    continue;
                }
                if ( field.getPropertyName().equals(OrgReviewRole.DELEGATION_TYPE_CODE) ) {
                    assertEquals( "Delegation type Field should have been hidden: ", Field.HIDDEN, field.getFieldType() );
                } else {
                    assertFalse( field.getPropertyName() + " should have been editable and not hidden", field.isReadOnly() || field.getFieldType().equals(Field.HIDDEN) );
                }
            }
        }
    }
}
 
开发者ID:kuali,项目名称:kfs,代码行数:24,代码来源:OrgReviewRoleMaintainableImplTest.java

示例12: getRows

import org.kuali.rice.kns.web.ui.Row; //导入方法依赖的package包/类
@Override
// remove the default value for Task for lookup
public List<Row> getRows() {
    List<Row> rowList = super.getRows();
    for (Row aRow : rowList) {
        List<Field> fields = aRow.getFields();
        for (Field aField : fields) {
            if (aField.getFieldLabel() != null && aField.getFieldLabel().equals("Task")) {
                if (aField.getPropertyValue() != null && aField.getPropertyValue().equals("0")) {
                    aField.setPropertyValue("");
                }
            }
        }
    }
    return rowList;
}
 
开发者ID:kuali-mirror,项目名称:kpme,代码行数:17,代码来源:TaskLookupableHelper.java

示例13: getRows

import org.kuali.rice.kns.web.ui.Row; //导入方法依赖的package包/类
/**
 * @see org.kuali.rice.kns.lookup.AbstractLookupableHelperServiceImpl#getRows()
 */
@Override
public List<Row> getRows() {
    List<Row> rows =  super.getRows();
    
    String offsetParmValue = parameterService.getParameterValueAsString(LaborEnterpriseFeedStep.class, LaborConstants.BenefitCalculation.LABOR_BENEFIT_CALCULATION_OFFSET_IND);
    
    if(offsetParmValue.equalsIgnoreCase("n")) {
        for(Iterator<Row> it = rows.iterator(); it.hasNext(); ) {
            Row row = (Row)it.next();
            for(Field field : row.getFields()) {
                if(field.getPropertyName().equalsIgnoreCase(LaborConstants.BenefitCalculation.ACCOUNT_CODE_OFFSET_PROPERTY_NAME) || field.getPropertyName().equalsIgnoreCase(LaborConstants.BenefitCalculation.OBJECT_CODE_OFFSET_PROPERTY_NAME)) {
                    it.remove();
                }
            }
        }
    }
    
    return rows;
}
 
开发者ID:kuali,项目名称:kfs,代码行数:23,代码来源:BenefitsCalculationLookupableHelperServiceImpl.java

示例14: reopenInactiveRecords

import org.kuali.rice.kns.web.ui.Row; //导入方法依赖的package包/类
/**
 * Attempts to reopen sub tabs which would have been closed for inactive records
 *
 * @param sections the list of Sections whose rows and fields to set the open tab state on
 * @param tabStates the map of tabKey->tabState.  This map will be modified to set entries to "OPEN"
 * @param collectionName the name of the collection reopening
 */
public static void reopenInactiveRecords(List<Section> sections, Map<String, String> tabStates, String collectionName) {
    for (Section section : sections) {
        for (Row row: section.getRows()) {
            for (Field field : row.getFields()) {
                if (field != null) {
                    if (Field.CONTAINER.equals(field.getFieldType()) && StringUtils.startsWith(field.getContainerName(), collectionName)) {
                        final String tabKey = WebUtils.generateTabKey(FieldUtils.generateCollectionSubTabName(field));
                        tabStates.put(tabKey, KualiForm.TabState.OPEN.name());
                    }
                }
            }
        }
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:22,代码来源:WebUtils.java

示例15: convertRowToAttributeFields

import org.kuali.rice.kns.web.ui.Row; //导入方法依赖的package包/类
public static List<RemotableAttributeField> convertRowToAttributeFields(Row row) {
    List<RemotableAttributeField> attributeFields = new ArrayList<RemotableAttributeField>();
    for (Field field : row.getFields()) {
        RemotableAttributeField remotableAttributeField = convertFieldToAttributeField(field);
        if (remotableAttributeField != null) {
            attributeFields.add(remotableAttributeField);
        }
    }
    return attributeFields;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:11,代码来源:FieldUtils.java


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