Input box Enumeration


enum InputTypeEnum public
{
/ **
* input box form field enumeration type
* /
the TEXT ( "text", new String [] { " "}, to true),
PASSWORD ( "Password", new String [] { " "}, to true),
dATE ( "date", new String [] { ""}, to true),
TEXTAREA ( "multi-line text", new String [] { ""}, to true),

the rADIO ( "radio", new String [] { ""}, to true),
CHECKBOX ( "multiple choice", new new String [] { ""}, to true),
the SELECT ( "drop-down box", new new String [] { ""}, to true),

the FILE ( "file Upload", new new String [] { ","}, to true);


Private String the 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;
}
}

Guess you like

Origin www.cnblogs.com/zzl0916/p/11145086.html