输入框枚举


public enum InputTypeEnum
{
/**
* 表单字段输入框类型枚举
*/
TEXT("文本", new String[]{""}, true),
PASSWORD("密码", new String[]{""}, true),
DATE("日期", new String[]{""}, true),
TEXTAREA("多行文本", new String[]{""}, true),

RADIO("单选", new String[]{""}, true),
CHECKBOX("多选", new String[]{""}, true),
SELECT("下拉框", new String[]{""}, true),

FILE("文件上传", new String[]{""}, true);


private String inputName;

private String[] config;
private boolean hasOption;

InputTypeEnum(String inputName, String[] config, boolean hasOption)
{
this.inputName = inputName;
this.config = config;
this.hasOption = hasOption;
}

/*public static InputTypeEnum getFormFieldEnumByCode(String type)
{
if (StringUtil.isEmpty(type))
{
return null;
}
InputTypeEnum[] inputTypeEnums = InputTypeEnum.values();
for (InputTypeEnum inputTypeEnum : inputTypeEnums)
{
if (type.equals(inputTypeEnum.type))
{
return inputTypeEnum;
}
}
return null;
}*/

public boolean checkConfig(ObjectNode configNode)
{
for (String str : config)
{
String value = configNode.get(str).asText();
}
return true;
}

public String getInputName()
{
return inputName;
}

public void setInputName(String inputName)
{
this.inputName = inputName;
}

public String[] getConfig()
{
return config;
}

public void setConfig(String[] config)
{
this.config = config;
}

public boolean isHasOption()
{
return hasOption;
}

public void setHasOption(boolean hasOption)
{
this.hasOption = hasOption;
}
}

转载于:https://www.cnblogs.com/zzl0916/p/11145086.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值