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