After reading and searching some time I found a solution in using a
converter. Is that the right way to do it (seems a bit cumbersome to me)?
AjaxEditableChoiceLabel ajaxEditableLabelUsertype =
new AjaxEditableChoiceLabel(
"usertype",
new PropertyModel(user, "usertype"),
Manager.getUsertypes(),
new ChoiceRenderer("name", "id")
)
{
@Override
public final IConverter getConverter(Class type) {
return new IConverter() {
public Object convertToObject(String value, Locale locale) {
return null;
}
public String convertToString(Object value, Locale locale) {
if (value != null) {
return ((UserType)value).getName();
} else {
return null;
}
}
};
}
}
Thanks
Roman
--
View this message in context:
http://www.nabble.com/AjaxEditableChoiceLabel%3A-display-value-for-Label--tp23687029p23695862.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]