cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Display name attribute value for dynamic Enum type in backoffice

mohanish1990
Explorer
0 Likes
983

Hello there,

I am trying to display name attribute value for a dynamic enum of type HybrisEnumValue in backoffice but since the enum definition doesn't have getter method for name it doesn't shows name instead PK is rendered of the object. If I do same thing for code it works fine. Below is my code snippet with which I am trying to see name attribute value is my base view for an enum SalesOrganizationEnum which is subtype of HybrisEnumValue

<context type="SalesAreaStructure" component="base" merge-by="type">
<y:base xmlns:y="http://www.hybris.com/cockpit/config/hybris">
<y:labels>
<y:label>salesGroup.salesOrganization.name+ ' ' +salesGroup.distributionChannel</y:label>
</y:labels>
</y:base>
</context>

On one answer I read we can defined a property with pattern type.<EnumClassName>.<enumCode>.name=Localized Name in our locales properties file of our custom extenstion but this is not a feasible solution as my enum is dynamic and I don't have predefined set of codes and localized names which I can defined in properties and do server restart.

Any suggestions are highly appreciated.

Accepted Solutions (0)

Answers (0)