sto cercando di ottenere i18n localizzazione lavorando su un/enum Groovy Grails,Come usare i18n con un enumerazione Grails/Groovy in un g: select?
public enum Notification {
GENERIC(0),
CONFIRM_RESERVATION(100),
CONFIRM_ORDER(200),
CONFIRM_PAYMENT(300),
final int id;
private Notification(int id) {
this.id = id
}
String toString() {
id.toString()
}
String getKey() {
name()
}
}
Eventuali suggerimenti su come potrei ottenere questo? Ho provato a mettere il pieno ecc nomeclasse in una localizzazione ma questo noet sembra funzionare
<g:select from="${Notification.values()}" name="notification" valueMessagePrefix="full.path.to.package.Notification"/>
Ti meriti un +100 ma dato che non potevo farlo, ho fatto +1! Grazie. –