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


Java Row类代码示例

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


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

示例1: performClear

import org.kuali.rice.kns.web.ui.Row; //导入依赖的package包/类
/**
 * This method does the logic for the clear action.
 *
 */
public void performClear(LookupForm lookupForm) {
    for (Iterator iter = this.getRows().iterator(); iter.hasNext();) {
        Row row = (Row) iter.next();
        for (Iterator iterator = row.getFields().iterator(); iterator.hasNext();) {
            Field field = (Field) iterator.next();
            if (field.isSecure()) {
                field.setSecure(false);
                field.setDisplayMaskValue(null);
                field.setEncryptedValue(null);
            }

            if (!field.getFieldType().equals(Field.RADIO)) {
                field.setPropertyValue(field.getDefaultValue());
                if (field.getFieldType().equals(Field.MULTISELECT)) {
                    field.setPropertyValues(null);
                }
            }
        }
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:25,代码来源:AbstractLookupableHelperServiceImpl.java

示例2: applyConditionalLogicForFieldDisplay

import org.kuali.rice.kns.web.ui.Row; //导入依赖的package包/类
/**
 * Calls methods that can be overridden by child lookupables to implement conditional logic for setting
 * read-only, required, and hidden attributes. Called in the last part of the lookup lifecycle so the
 * fields values that will be sent will be correctly reflected in the rows (like after a clear).
 *
 * @see #getConditionallyReadOnlyPropertyNames()
 * @see #getConditionallyRequiredPropertyNames()
 * @see #getConditionallyHiddenPropertyNames()
 * @see LookupableHelperService#applyConditionalLogicForFieldDisplay()
 */
public void applyConditionalLogicForFieldDisplay() {
    Set<String> readOnlyFields = getConditionallyReadOnlyPropertyNames();
    Set<String> requiredFields = getConditionallyRequiredPropertyNames();
    Set<String> hiddenFields = getConditionallyHiddenPropertyNames();

    for (Iterator iter = this.getRows().iterator(); iter.hasNext();) {
        Row row = (Row) iter.next();
        for (Iterator iterator = row.getFields().iterator(); iterator.hasNext();) {
            Field field = (Field) iterator.next();

            if (readOnlyFields != null && readOnlyFields.contains(field.getPropertyName())) {
                field.setReadOnly(true);
            }

            if (requiredFields != null && requiredFields.contains(field.getPropertyName())) {
                field.setFieldRequired(true);
            }

            if (hiddenFields != null && hiddenFields.contains(field.getPropertyName())) {
                field.setFieldType(Field.HIDDEN);
            }
        }
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:35,代码来源:AbstractLookupableHelperServiceImpl.java

示例3: 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

示例4: createBlankSpace

import org.kuali.rice.kns.web.ui.Row; //导入依赖的package包/类
/**
 * This is a helper method to create and add a blank space to the fieldOnly List.
 *
 * @param fieldOnlyList
 * @param rows
 * @param numberOfColumns
 * @return fieldsPosition
 */
private static int createBlankSpace(List<Field> fieldOnlyList, List<Row> rows, int numberOfColumns, int fieldsPosition) {
    int fieldOnlySize = fieldOnlyList.size();
    if (fieldOnlySize > 0) {
        for (int i = 0; i < (numberOfColumns - fieldOnlySize); i++) {
            Field empty = new Field();
            empty.setFieldType(Field.BLANK_SPACE);
            // Must be set or AbstractLookupableHelperServiceImpl::preprocessDateFields dies
            empty.setPropertyName(Field.BLANK_SPACE);
            fieldOnlyList.add(empty);
        }
        rows.add(new Row(new ArrayList(fieldOnlyList)));
        fieldOnlyList.clear();
        fieldsPosition = 0;
    }
    return fieldsPosition;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:25,代码来源:FieldUtils.java

示例5: meshSections

import org.kuali.rice.kns.web.ui.Row; //导入依赖的package包/类
/**
 * Merges together sections of the old maintainable and new maintainable.
 *
 * @param oldSections
 * @param newSections
 * @param keyFieldNames
 * @param maintenanceAction
 * @param readOnly
 * @return List of Section objects
 */
public static List meshSections(List oldSections, List newSections, List keyFieldNames, String maintenanceAction, boolean readOnly, MaintenanceDocumentRestrictions auths, String documentStatus, String documentInitiatorPrincipalId) {
    List meshedSections = new ArrayList();

    for (int i = 0; i < newSections.size(); i++) {
        Section maintSection = (Section) newSections.get(i);
        List sectionRows = maintSection.getRows();
        Section oldMaintSection = (Section) oldSections.get(i);
        List oldSectionRows = oldMaintSection.getRows();
        List<Row> meshedRows = new ArrayList();
        meshedRows = meshRows(oldSectionRows, sectionRows, keyFieldNames, maintenanceAction, readOnly, auths, documentStatus, documentInitiatorPrincipalId);
        maintSection.setRows(meshedRows);
        if (StringUtils.isBlank(maintSection.getErrorKey())) {
            maintSection.setErrorKey(MaintenanceUtils.generateErrorKeyForSection(maintSection));
        }
        meshedSections.add(maintSection);
    }

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

示例6: customizeSections

import org.kuali.rice.kns.web.ui.Row; //导入依赖的package包/类
public static List<Section> customizeSections(RuleBaseValues rule, List<Section> sections, boolean delegateRule) {

		List<Section> finalSections = new ArrayList<Section>();
		for (Section section : sections) {
			// unfortunately, in the case of an inquiry the sectionId will always be null so we have to check section title
			if (section.getSectionTitle().equals(RULE_ATTRIBUTES_SECTION_TITLE) ||
					RULE_ATTRIBUTES_SECTION_ID.equals(section.getSectionId())) {
				List<Row> ruleTemplateRows = getRuleTemplateRows(rule, delegateRule);
				if (!ruleTemplateRows.isEmpty()) {
					section.setRows(ruleTemplateRows);
					finalSections.add(section);
				}
			} else if (ROLES_MAINTENANCE_SECTION_ID.equals(section.getSectionId())) {
				if (hasRoles(rule)) {
					finalSections.add(section);
				}
			} else {
				finalSections.add(section);
			}
		}

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

示例7: getRuleTemplateRows

import org.kuali.rice.kns.web.ui.Row; //导入依赖的package包/类
public static List<Row> getRuleTemplateRows(RuleBaseValues rule, boolean delegateRule) {
	List<Row> rows = new ArrayList<Row>();
	RuleTemplateBo ruleTemplate = rule.getRuleTemplate();
	Map<String, String> fieldNameMap = new HashMap<String, String>();
	// refetch rule template from service because after persistence in KNS, it comes back without any rule template attributes
	if (ruleTemplate != null && ruleTemplate.getId() != null) {
		ruleTemplate = KEWServiceLocator.getRuleTemplateService().findByRuleTemplateId(ruleTemplate.getId());
		if (ruleTemplate != null) {
			List<RuleTemplateAttributeBo> ruleTemplateAttributes = ruleTemplate.getActiveRuleTemplateAttributes();
			Collections.sort(ruleTemplateAttributes);
			for (RuleTemplateAttributeBo ruleTemplateAttribute : ruleTemplateAttributes) {
				if (!ruleTemplateAttribute.isWorkflowAttribute()) {
					continue;
				}
                Map<String, String> parameters = getFieldMapForRuleTemplateAttribute(rule, ruleTemplateAttribute);
                WorkflowRuleAttributeRows workflowRuleAttributeRows =
                        KEWServiceLocator.getWorkflowRuleAttributeMediator().getRuleRows(parameters, ruleTemplateAttribute);
                List<Row> attributeRows = transformAndPopulateAttributeRows(workflowRuleAttributeRows.getRows(),
                        ruleTemplateAttribute, rule, fieldNameMap, delegateRule);
                rows.addAll(attributeRows);
			}
		}
		transformFieldConversions(rows, fieldNameMap);
	}
	return rows;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:27,代码来源:WebRuleUtils.java

示例8: 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

示例9: 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

示例10: 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

示例11: loadRows

import org.kuali.rice.kns.web.ui.Row; //导入依赖的package包/类
private void loadRows() {
	getRoles().clear();
	if (getRuleTemplateId() != null) {
		RuleTemplateBo ruleTemplate = getRuleTemplateService().findByRuleTemplateId(getRuleTemplateId());
		if (ruleTemplate != null) {
			setRuleTemplateName(ruleTemplate.getName());
			List<RuleTemplateAttributeBo> ruleTemplateAttributes = ruleTemplate.getActiveRuleTemplateAttributes();
			Collections.sort(ruleTemplateAttributes);
			List<Row> rows = new ArrayList<Row>();
			for (RuleTemplateAttributeBo ruleTemplateAttribute : ruleTemplateAttributes) {
				if (!ruleTemplateAttribute.isWorkflowAttribute()) {
					continue;
				}
                WorkflowRuleAttributeRows workflowRuleAttributeRows =
                        KEWServiceLocator.getWorkflowRuleAttributeMediator().getRuleRows(getFieldMap(ruleTemplateAttribute.getId()), ruleTemplateAttribute);
                rows.addAll(workflowRuleAttributeRows.getRows());
                getRoles().addAll(KEWServiceLocator.getWorkflowRuleAttributeMediator().getRoleNames(ruleTemplateAttribute));
			}
			setRows(rows);
		}
	}
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:23,代码来源:WebRuleBaseValues.java

示例12: populateFieldsHelperMethod

import org.kuali.rice.kns.web.ui.Row; //导入依赖的package包/类
private void populateFieldsHelperMethod(Map<String, String> fieldValues,
        RuleTemplateAttribute ruleTemplateAttribute, boolean setAndAddValuesToRow) {

    WorkflowRuleAttributeRows workflowRuleAttributeRows =
            KEWServiceLocator.getWorkflowRuleAttributeMediator().getSearchRows(fieldValues, ruleTemplateAttribute);
    for (Row row : workflowRuleAttributeRows.getRows()) {
        List<Field> fields = new ArrayList<Field>();
        for (Iterator<Field> iterator2 = row.getFields().iterator(); iterator2.hasNext(); ) {
            Field field = iterator2.next();
            if (fieldValues.get(field.getPropertyName()) != null) {
                field.setPropertyValue(fieldValues.get(field.getPropertyName()));
            }

            fields.add(field);
            fieldValues.put(field.getPropertyName(), field.getPropertyValue());
        }

        if (setAndAddValuesToRow) {
            row.setFields(fields);
            additionalFieldRows.add(row);
        }
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:24,代码来源:AbstractRuleLookupableHelperServiceImpl.java

示例13: 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

示例14: 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

示例15: buildTextRow

import org.kuali.rice.kns.web.ui.Row; //导入依赖的package包/类
/**
 * This method builds a workflow-lookup-screen Row of type TEXT, with no quickfinder/lookup.
 *
 * @param propertyClass The Class of the BO that this row is based on. For example, Account.class for accountNumber.
 * @param boPropertyName The property name on the BO that this row is based on. For example, accountNumber for
 *        Account.accountNumber.
 * @param workflowPropertyKey The workflow-lookup-screen property key. For example, account_nbr for Account.accountNumber. This
 *        key can be anything, but needs to be consistent with what is used for the row/field key on the java attribute, so
 *        everything links up correctly.
 * @return A populated and ready-to-use workflow lookupable.Row.
 */
public static Row buildTextRow(Class propertyClass, String boPropertyName, String workflowPropertyKey) {
    if (propertyClass == null) {
        throw new IllegalArgumentException("Method parameter 'propertyClass' was passed a NULL value.");
    }
    if (StringUtils.isBlank(boPropertyName)) {
        throw new IllegalArgumentException("Method parameter 'boPropertyName' was passed a NULL or blank value.");
    }
    if (StringUtils.isBlank(workflowPropertyKey)) {
        throw new IllegalArgumentException("Method parameter 'workflowPropertyKey' was passed a NULL or blank value.");
    }
    List<Field> fields = new ArrayList<Field>();
    Field field;
    field = FieldUtils.getPropertyField(propertyClass, boPropertyName, false);
    fields.add(field);
    return new Row(fields);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:28,代码来源:WorkflowUtils.java


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