Here is my Entity Class
public enum UnitType {
HOSPITAL, HEALTHCENTER
}
public static LinkedHashMap<UnitType, String> unitType = new LinkedHashMap<UnitType, String>() {
{
put(UnitType.HEALTHCENTER, "Κέντρο Υγείας");
put(UnitType.HOSPITAL, "Νοσοκομείο");
}
};
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String name;
private String address;
@Column(columnDefinition = "TEXT")
private String info;
@Enumerated(EnumType.STRING)
private UnitType type;
At my jsp
<c:forEach var="unit" items="${requestScope.units}">
<tr>
<td>${unit.id}</td>
<td>${unit.name}</td>
<td>${unit.address}</td>
<td>??!?</td>
<td><a href="#">Περισσότερα</a></td>
</tr>
</c:forEach>
How can i place the text value of the enum at ??!? .. Any idea? Tried some ways but nothing worked..