本文整理汇总了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);
}
}
}
示例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);
}
}
}
示例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;
}
示例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()));
}
}
}
}
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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) );
}
}
}
}
}
示例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) );
}
}
}
}
}
示例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) );
}
}
}
}
}
示例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;
}
示例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;
}
示例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());
}
}
}
}
}
}
示例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;
}