Я создал свой пользовательский компонент формы.После того, как я добавил его в смарт-редактирование, он не вызывает контроллер для заполнения формы.Я создал itemtype MyComponentModel в * -items.xml, проверил в развертывании HAC, он там.Я также добавил аннотации, подобные этому ответу
@Controller("MyComponentController")
@RequestMapping(value = ControllerConstants.Actions.Cms.MyComponent)
public class MyComponentController extends AbstractAcceleratorCMSComponentController<MyComponentModel> {
, и значение сопоставления находится в моих ControllerConstants, например:
String _Prefix = "/view/"; // NOSONAR
String _Suffix = "Controller"; // NOSONAR
String MyComponent = _Prefix + MyComponentModel._TYPECODE + _Suffix; // NOSONAR
Когда я добавляю его в smartedit настраница, файл .jsp загружен (я вижу текст), но так как контроллер не вызывается
Согласно Hybris doc, вызываемый метод в моем контроллере должен быть таким:
@Override
protected void fillModel(HttpServletRequest request, Model model, MyComponentModel component) {
Но он не вызывается, поэтому я не могу заполнить форму.
<div class="span-20 last">
I can see this text
<div class="row item_container_holder">
<c:if test="${not empty MyForm}">
<%--this condition is false, form is empty--%>
Обратите внимание, что я также добавил компонент в impex, я обновил систему в HAC, я пыталсясинхронизировать каталоги.
INSERT_UPDATE MyComponent; $contentCV[unique = true]; uid[unique = true] ; name ; &componentRef
;; MyComponent ; MyComponent ; MyComponent
РЕДАКТИРОВАТЬ:
* - items.xml
<itemtype code="MyComponent" autocreate="true" generate="true" extends="SimpleCMSComponent"
jaloclass="mypackage.b2c.core.jalo.components.MyComponent">
<deployment table="MyComponents" typecode="15900"/>
<attributes>
<attribute qualifier="title" type="localized:java.lang.String">
<persistence type="property" />
<modifiers />
<description>Localized title of the component.</description>
</attribute>
</attributes>
</itemtype>