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


Java RemotableCheckboxGroup类代码示例

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


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

示例1: doCheckboxLogic

import org.kuali.rice.core.api.uif.RemotableCheckboxGroup; //导入依赖的package包/类
private boolean doCheckboxLogic(String kimTypeId, String attrId) {
    final KimAttributeField attributeDefinition = getAttributeDefinition(kimTypeId, attrId);
    return attributeDefinition != null
            && attributeDefinition.getAttributeField().getControl() != null
            && (attributeDefinition.getAttributeField().getControl() instanceof RemotableCheckboxGroup
                    || attributeDefinition.getAttributeField().getControl() instanceof RemotableCheckbox);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:8,代码来源:UiDocumentServiceImpl.java

示例2: applyControlAttributes

import org.kuali.rice.core.api.uif.RemotableCheckboxGroup; //导入依赖的package包/类
private static void applyControlAttributes(RemotableAttributeField remotableField, Field field) {
    RemotableControlContract control = remotableField.getControl();
    String fieldType = null;

    if (control == null) {
        throw new IllegalStateException("Given attribute field with the following name has a null control: " + remotableField.getName());
    }
    if (control == null || control instanceof RemotableTextInput) {
        fieldType = Field.TEXT;
        if (((RemotableTextInput)remotableField.getControl()).getSize() != null) {
          field.setSize(((RemotableTextInput)remotableField.getControl()).getSize().intValue());
        }
        if (((RemotableTextInput)remotableField.getControl()).getSize() != null) {
            field.setFormattedMaxLength(((RemotableTextInput)remotableField.getControl()).getSize().intValue());
        }
    } else if (control instanceof RemotableCheckboxGroup) {
        RemotableCheckboxGroup checkbox = (RemotableCheckboxGroup)control;
        fieldType = Field.CHECKBOX;
        field.setFieldValidValues(FieldUtils.convertMapToKeyValueList(checkbox.getKeyLabels()));
    } else if (control instanceof RemotableCheckbox) {
        fieldType = Field.CHECKBOX;
    } else if (control instanceof RemotableHiddenInput) {
        fieldType = Field.HIDDEN;
    } else if (control instanceof RemotablePasswordInput) {
        throw new IllegalStateException("Password control not currently supported.");
    } else if (control instanceof RemotableRadioButtonGroup) {
        fieldType = Field.RADIO;
        RemotableRadioButtonGroup radioControl = (RemotableRadioButtonGroup)control;
        field.setFieldValidValues(FieldUtils.convertMapToKeyValueList(radioControl.getKeyLabels()));
    } else if (control instanceof RemotableSelect) {
        RemotableSelect selectControl = (RemotableSelect)control;

        field.setFieldValidValues(FieldUtils.convertMapToKeyValueList(selectControl.getKeyLabels()));
        if (selectControl.isMultiple()) {
            fieldType = Field.MULTISELECT;
        } else if (selectControl.isRefreshOnChange()) {
            fieldType = Field.DROPDOWN_REFRESH;
        } else {
            fieldType = Field.DROPDOWN;
        }
    } else if (control instanceof RemotableTextarea) {
        fieldType = Field.TEXT_AREA;
        if (((RemotableTextarea)remotableField.getControl()).getCols() != null
                && ((RemotableTextarea)remotableField.getControl()).getRows() != null) {
            field.setCols(((RemotableTextarea)remotableField.getControl()).getCols().intValue());
            field.setSize(((RemotableTextarea)remotableField.getControl()).getRows().intValue());
        }
    } else {
        throw new IllegalArgumentException("Given control type is not supported: " + control.getClass());
    }
    // compare setting of Field default values to {@link ComponentFactory#translateRemotableField}
    if (!remotableField.getDefaultValues().isEmpty()) {
        field.setDefaultValue(remotableField.getDefaultValues().iterator().next());
        // why are these two not related? :/
        field.setPropertyValues(remotableField.getDefaultValues().toArray(new String[remotableField.getDefaultValues().size()]));
        field.setPropertyValue(field.getDefaultValue());
    }
    field.setFieldType(fieldType);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:60,代码来源:FieldUtils.java


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