/** * This method must be used for all the cases when you need to display * property on UI. It converts its value from any type to string. * * @return */ public String getDisplayValue() { return getStringValue(); }
/** * This method must be used for all the cases when you need to display * property on UI. It converts its value from any type to string. * * @return */ public String getDisplayValue() { return getStringValue(); }
private String getEnumMultiSelectComponentCode(String componentId, TableProperty tableProperty) { Class<?> instanceClass = tableProperty.getType().getComponentType(); String valueString = tableProperty.getStringValue(); String[] values = EnumUtils.getNames(instanceClass); String[] displayValues = EnumUtils.getValues(instanceClass); String id = String.format("%s:%s:enumArraySelect", componentId, tableProperty.getName()); String componentCode = new HTMLRenderer().getMultiSelectComponentCode(id, values, displayValues, valueString); return getEditorHTMLCode(id, componentCode); }
private String getEnumSelectComponentCode(String componentId, TableProperty tableProperty) { Class<?> instanceClass = tableProperty.getType(); String value = tableProperty.getStringValue(); String[] values = EnumUtils.getNames(instanceClass); String[] displayValues = EnumUtils.getValues(instanceClass); String id = String.format("%s:%s:enumSelect", componentId, tableProperty.getName()); String componentCode = new HTMLRenderer().getSingleSelectComponentCode(id, values, displayValues, value); return getEditorHTMLCode(id, componentCode); }