1

We have created a Custom "Generic module" in DXA Java code. We have created the following additional items:

1) Entity class "HTMLForm" under the custom package "com.kc.webapp.common.api.model.entity"

2) Module initializer class under the custom package "com.kc.webapp.main.modules.generic" with the code

    viewModelRegistry.registerViewEntityClass("Generic:HTMLForm", HTMLForm.class);

3) Created a View JSP file "HTMLForm" in location "/web-inf/view/generic/entity/"

4) A Controller class to display the content.

We are getting this error by putting "Generic:Generic" value in "Controller Name" field of the "MVC metadata" of Component Template.

ERROR c.s.w.m.c.core.MainController - Exception while processing request for: /system/mvc/Generic/Generic/Entity/Main/349
com.sdl.webapp.common.controller.exception.BadRequestException: Request to unknown action: /system/mvc/Generic/Generic/Entity/Main/349

and if that field is blank then we are getting full page according to the view but without any data.

Can we use Core Controllers to get the data of any custom entity?

What are the steps for mapping the custom controller with the entity?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.