How to add a Custom Component Java Class to a Component in the CMS Console?

Hello, :raised_hand_with_fingers_splayed:

I recently watched the “brXM - Developer Fundamentals online training” and stumbled upon a question/problem in “Backend Tutorial”.

The Section of the online training deals with the Creation of a custom Java Class to create a new Component. The user is asked to create a new CustomComponent Java Class which extends the CommonComponent. Later in the Tutorial the Java Code of the CustomComponent is shown but it is not shown how to add the newly created Class to a Component in the CMS Console.

I assume that I have to add it using the right path in the “hst:componentclassname” Property in Catalog Item. :thinking:

I also read the tutorial (Add Featured Products to the Home Page) and the documentation (Delivery Tier Component Development)

I appreciate any help or hints and will try to specify my Question if it is not clear.
Thank you very much! :medal_military:

Hey,

your assumption is correct! You have to define the property “hst:componentclassname” with the full name of your custom class (eg. org.example.CustomComponent) for the component node under the hst:catalog in the hst configuration of your project.

If you are replacing the class for an existing component you would have to update the property also for any instances of that component under the hst:workspace and within the available containers.

Kind regards,
Lef

1 Like