Hello
i test the access of a partner by a java Controller
i try to rewrite the generation of the full name in Partner
I try to concatenate firstName et Name but also the titleSelect
But the titleSelect is a selection field so i retrieve an integer (1 - 2 - 3 ) instead M. Me …
this is my code
public void computeFullName(ActionRequest request, ActionResponse response) {
Partner partner = request.getContext().asType(Partner.class);
String title ="";
title = partner.getTitleSelect();
Do you have a solution to retrieve not the value of the option but more the text
Hi
Sadly, this is not possible with select, ADK has an enum type which is perfect for this use case but it is not used in ABS right now.
This should work
String value = I18n.get(
Beans.get(MetaSelectItemRepository.class) // You can @Inject it too
.all()
.filter(
"self.select.name = ? AND self.value = ?",
"partner.title.type.select",
partner.getTitleSelect())
.fetchOne().getTitle()
);