*/
protected GUIElement createTextGUIElementFromMetadata(String displayName,
String description, String field, boolean repeatable,
boolean disabled, boolean isPasswordField) {
try {
ColumnMetadata meta = getDBColumnMetadata(variableToColumnName(field));
GUIElement elem = new GUIElement(displayName, description, field,
getValueFromVariable(field), (!meta.isNullable()),
GUIElement.TEXT, meta.getDataSize(), null, repeatable,
null, disabled, false);
if (isPasswordField) {
elem.setPasswordField(true);
}
// add min/max values for numeric data types
if ((meta.getDataType() == ColumnMetadata.INTEGER)
|| (meta.getDataType() == ColumnMetadata.SMALL_INTEGER)) {
elem.setMaxValue(meta.getNumberMaximum());
elem.setMinValue(meta.getNumberMinimum());
} /*
* else if (meta.getDataType()==ColumnMetadata.TIMESTAMP) {
* elem.setType(GUIElement.DATE); elem.setMaxLength(30); }
*/