CommunityCommons.SubstituteTemplate use getCaption on enumeration

2
If I am correct substituteTemplate currently uses the stringvalue of an enumeration to replace {enum}. How can I change the code to use the caption (getCaption)?
asked
2 answers
1

Untested, but if you add the following lines to javasource/communitycommons/ORM.java in function 'getValueOfPath' after the second if statement (line 166), you will probably experience the desired behavior:

        else if (member instanceof MendixEnum) {
            MendixEnum m = (MendixEnum) member;
            String value = m.getValue(context);
            if (value == null || value.isEmpty())
                return "";
            return Core.getInternationalizedString(context, m.getEnumeration().getEnumValues().get(value).getI18NCaptionKey());
        }
answered
1

I believe that in java an enumeration has the function getCaption which would return the caption of the value :] Then again, what does the function Substitute template do? Because i am not really sure if you really want to make any changes in the code of the community commons itself.

answered