本文整理汇总了Java中org.kuali.rice.kns.web.ui.Row类的典型用法代码示例。如果您正苦于以下问题:Java Row类的具体用法?Java Row怎么用?Java Row使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Row类属于org.kuali.rice.kns.web.ui包,在下文中一共展示了Row类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: buildTextRowWithLookup
import org.kuali.rice.kns.web.ui.Row; //导入依赖的package包/类
/**
* This method builds a workflow-lookup-screen Row of type TEXT, with the attached lookup icon and functionality.
*
* @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.
* @param fieldConversionsByBoPropertyName A list of extra field conversions where the key is the business object property name
* and the value is the workflow property key
* @return A populated and ready-to-use workflow lookupable.Row, which includes both the property field and the lookup icon.
*/
public static Row buildTextRowWithLookup(Class propertyClass, String boPropertyName, String workflowPropertyKey, Map fieldConversionsByBoPropertyName) {
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.");
}
Field field;
field = FieldUtils.getPropertyField(propertyClass, boPropertyName, false);
List<Field> fields = new ArrayList<Field>();
fields.add(field);
return new Row(fields);
}
开发者ID:kuali,项目名称:kc-rice,代码行数:31,代码来源:WorkflowUtils.java
示例17: buildDropdownRow
import org.kuali.rice.kns.web.ui.Row; //导入依赖的package包/类
/**
* This method builds a workflow-lookup-screen Row of type DROPDOWN.
*
* @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.
* @param optionMap The map of value, text pairs that will be used to constuct the dropdown list.
* @return A populated and ready-to-use workflow lookupable.Row.
*/
public static Row buildDropdownRow(Class propertyClass, String boPropertyName, String workflowPropertyKey, Map<String, String> optionMap, boolean addBlankRow) {
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.");
}
if (optionMap == null) {
throw new IllegalArgumentException("Method parameter 'optionMap' was passed a NULL 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,代码行数:32,代码来源:WorkflowUtils.java
示例18: testGetSearchFields
import org.kuali.rice.kns.web.ui.Row; //导入依赖的package包/类
@Test public void testGetSearchFields() {
//Filling in a random document type name... Revisit
String documentTypeName = "SearchDocType";
StandardGenericXMLSearchableAttribute searchAttribute = getAttribute(null);
ExtensionDefinition ed = createExtensionDefinition("XMLSearchableAttribute");
List<RemotableAttributeField> remotableAttributeFields = searchAttribute.getSearchFields(ed, documentTypeName);
List<Row> rows = FieldUtils.convertRemotableAttributeFields(remotableAttributeFields);
assertTrue("Invalid number of search rows", rows.size() == 1);
//we really just want this to load without exploding
searchAttribute = getAttribute("BlankDropDownSearchAttribute");
ed = createExtensionDefinition("BlankDropDownSearchAttribute");
remotableAttributeFields = searchAttribute.getSearchFields(ed, documentTypeName);
rows = FieldUtils.convertRemotableAttributeFields(remotableAttributeFields);
assertEquals("Invalid number of search rows", 1, rows.size());
Row row = (Row) rows.get(0);
Field field = row.getField(0);
assertEquals("Should be 5 valid values", 5, field.getFieldValidValues().size());
assertEquals("Default value is not correct", "AMST", field.getPropertyValue());
}
开发者ID:kuali,项目名称:kc-rice,代码行数:23,代码来源:StandardGenericXMLSearchableAttributeTest.java
示例19: testBlankValidValuesOnKeyValues
import org.kuali.rice.kns.web.ui.Row; //导入依赖的package包/类
/**
* Tests that Field objects use correct KeyValue instances when checks for blank valid values are performed
* (such as when JSP renders drop-downs), to verify that KULRICE-3587 has been fixed.
*
* @throws Exception
*/
@Test public void testBlankValidValuesOnKeyValues() throws Exception {
boolean[] shouldHaveBlank = {true, false};
String[] attributesToTest = {"XMLSearchableAttributeWithBlank", "XMLSearchableAttributeWithoutBlank"};
// Verify that the getHasBlankValidValue() method on each field returns the correct result and does not cause unexpected exceptions.
for (int i = 0; i < shouldHaveBlank.length; i++) {
ExtensionDefinition ed = createExtensionDefinition(attributesToTest[i]);
List<RemotableAttributeField> remotableAttributeFields = getAttribute(attributesToTest[i]).getSearchFields(ed, "BlankValidValuesDocType");
List<Row> rowList = FieldUtils.convertRemotableAttributeFields(remotableAttributeFields);
assertEquals("The searching fields for " + attributesToTest[i] + " should have exactly one element", 1, rowList.size());
assertEquals("Searching row for " + attributesToTest[i] + " should have exactly one field", 1, rowList.get(0).getFields().size());
Field testField = rowList.get(0).getFields().get(0);
try {
assertEquals("The field for " + attributesToTest[i] + " does not have the expected getHasBlankValidValue() result",
shouldHaveBlank[i], testField.getHasBlankValidValue());
} catch (Exception ex) {
fail("An exception occurred while running getHasBlankValidValue() on " + attributesToTest[i] + ": " + ex.getMessage());
}
}
}
开发者ID:kuali,项目名称:kc-rice,代码行数:28,代码来源:StandardGenericXMLSearchableAttributeTest.java
示例20: testGetRows
import org.kuali.rice.kns.web.ui.Row; //导入依赖的package包/类
/**
* Tests generation of lookup form rows
*
* @throws Exception
*/
@Test public void testGetRows() throws Exception {
// rows should have been populated by business object class initialization
List<? extends Row> rows = lookupableImpl.getRows();
Assert.assertEquals(4, rows.size());
Field f = rows.get(0).getField(0);
Assert.assertEquals("number", f.getPropertyName());
Assert.assertEquals("Account Number", f.getFieldLabel());
Assert.assertEquals("text", f.getFieldType());
f = rows.get(1).getField(0);
Assert.assertEquals("name", f.getPropertyName());
Assert.assertEquals("Account Name", f.getFieldLabel());
Assert.assertEquals("text", f.getFieldType());
f = rows.get(2).getField(0);
Assert.assertEquals("extension.accountTypeCode", f.getPropertyName());
Assert.assertEquals("Account Type Code", f.getFieldLabel());
Assert.assertEquals("dropdown", f.getFieldType());
f = rows.get(3).getField(0);
Assert.assertEquals("amId", f.getPropertyName());
Assert.assertEquals("Account Manager", f.getFieldLabel());
Assert.assertEquals("text", f.getFieldType());
}
开发者ID:kuali,项目名称:kc-rice,代码行数:31,代码来源:KualiLookupableTest.java
注:本文中的org.kuali.rice.kns.web.ui.Row类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论