Showing results for 
Search instead for 
Did you mean: 

SmartEdit 6.1 | CMSWebservices | Required String parameter 'enumClass' is not present error

Former Member
0 Kudos

I wanted to edit the enum attribute of RotatingImagesComponent in smartEdit I followed the following steps:

  1. Extended the Structure API : Used ""enumComponentTypeAttributePopulator" type component attribute populator for the Enum attribute.

  2. Extended the Component API : Created a new bean class for RotatingImagesComponent and declared the property type as "" for Enum property. Also, created the model populator and data populator for the component.

While editing this component in smartEdit, I am getting the "Required String parameter 'enumClass' is not present error" error on loading of content editor. (Please see the attached screenshot).

Also, only the current value of Enum attribute is shown in dropdown window instead of all the enum type values.

Former Member
0 Kudos

Do I need to define additional bean property for the whole enum list or some other parameter is missing in the bean definition.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Tarun,

For enums, OOTB cmswebservices already defines an "enumComponentTypeAttributePopulator" as follow:

 <bean id="enumComponentTypeAttributePopulator" class="de.hybris.platform.cmsfacades.types.populator.CmsStructureTypeComponentTypeAttributePopulator">
     <property name="cmsStructureType" value="Enum" />

The next steps for you would be to expose the enum component type:

Excerpt from Extending the Structure API: Exposing Your New Component Types

To expose your new component types, you must do the following:
- 1. Declare a component type structure.
- 2. Declare a component type attribute structure.

For your case, you might be interested in returning the enum value and label. This could be done by returning a list of OptionData as described in the "Exposing Additional Component Type Attribute Properties" section.

Excerpt from Extending the Structure API: Exposing Your Additional Component Type Attribute Properties
- Step 4: Create ComponentTypeAttribute Populator
- Step 5: Register the Property Populator

Answers (0)