I’m trying to create a simple component with a static text.
what I did:
created hst:containeritemcomponent in catalog
created hst:template in templates
created the template in Freemaker
created java class org.example.beans.Buttons
But when I add it on a page it’s empty
And I see these errors in the console
What I did wrong? Probably there is some issue with the namespace, but I’m not sure.
What steps missed?
PS looks like it’s hard to view the images here… to view the images open the in a new tab or zoom in the page, sorry.
“org.example.beans.Buttons cannot be cast to HStComponent” is the clue…
Your mixing up document beans and components. A bean extends HippoDocument and represents a document instance (data), below /content/documents. You need a component (controller) extending BaseHstComponent. See at HstComponent Java Class - Bloomreach Experience Manager - The Fast and Flexible Headless CMS and sibling pages.
Also you can use Essentials (Bloomreach Experience Manager Essentials Project Setup - Bloomreach Experience Manager - The Fast and Flexible Headless CMS) to add say Simple Content and see how it works.