if (action != null && action.equals("update")) {
entity = modelContext.getUpdateEntity();
} else {
entity = modelContext.getEntity();
}
PropertyConfig propertyConfig = modelContext.getPropertyConfig();
textArea = new TextArea("propertyValue", new PropertyModel(entity,
propertyConfig.getCode()));
ModelConfig modelConfig = propertyConfig.getContextConceptConfig()
.getContextModelConfig();
if (modelConfig.isValidateForm()) {
if (propertyConfig.isRequired() && propertyConfig.isUpdate()) {
textArea.setRequired(true);
}
}
int propertySize = propertyConfig.getDisplayLengthInt();
int areaRowSize = (propertySize/App.AREA_COLUMN_SIZE) + 1;
String noOfRows = Transformer.string(areaRowSize);
String noOfColumns = Transformer.string(App.AREA_COLUMN_SIZE);
setAttribute("rows", noOfRows);
setAttribute("cols", noOfColumns);
if (!propertyConfig.isUpdate()) {
setAttribute("readonly", "readonly");
}
FormComponentFeedbackBorder propertyFeedback = new FormComponentFeedbackBorder(
"propertyFeedback");