/**
* Initialize form data based on repository entry.
*/
public void init() {
if (enableAuthorView) {
addFormElement("cif_id", new StaticTextElement("cif.id", entry.getKey() != null ? entry.getKey().toString() : translate("cif.id.na")));
}
displayName = new TextElement("cif.displayname", entry.getDisplayname(), true, MAX_DISPLAYNAME);
displayName.setMaxLength(100);
addFormElement("cif_displayname", displayName);
initialAuthor = new StaticTextElement("cif.initialAuthor", entry.getInitialAuthor());
addFormElement("cif_initialAuthor", initialAuthor);
// for empty TextAreas, put at least a space so that TextArea gets displayed correctly
description = new TextAreaElement("cif.description", 4, 40, (entry.getDescription() != null) ? entry.getDescription() : " ");
description.setMandatory(true);
addFormElement("cif_description", description);
resourceName = new StaticTextElement("cif.resourcename", (entry.getResourcename() == null) ? "-" : entry.getResourcename());
resourceName.setMaxLength(100);
addFormElement("cif_resourcename", resourceName);
StringBuilder typeDisplayText = new StringBuilder(100);
if (typeName != null) { // add image and typename code