on 08-03-2016 10:35 AM
HI Team
I am facing an issue here , please help me
I was created one addon through extgen and i have added one controller in addon , now i am trying to call that controller from storefront , but it was not mapping the call.
Note : i was installed addon on that storefront.
thanks Nagendra D
Hi Nagendra,
Make sure that you have added component-scan to your addon-web-spring.xml:
<context:component-scan base-package="package.with.your.controller" />
Cheers, Mirek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Let's say the storefront is yb2bacceleratorstorefront. The addon is myb2baddon.
yb2baccelratorstorefront/extensioninfo.xml contains require directive
myb2baddon/project.properties exist and contains: yb2bacceleratorstorefront.additionalWebSpringConfigs.myb2baddon=classpath\:/savedcartsaddon/web/spring/myb2baddon-web-spring.xml
the myb2baddon-web-spring.xml contains componnet-scan with proper package
The class is annotated with @Controller
ant all has been issued so the controller class was copied to yb2bacceleratorstorefront\web\addonsrc\myb2baddon and compiled.
here you can read more about addoinstall tool:
https://help.hybris.com/6.1.0/hcd/8adf7365866910149ceb975f778d809d.html
Hi,
By adding this to my addon-web-spring.xml file, I get below exception while server start:
Caused by: org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'xyz' for bean class [controller.package.XYZController] conflicts with existing, non-compatible bean definition of same name and class [controller.package.XYZController]
Hi Nagendra,
Try with below impex, replace with your addonName and path
INSERT_UPDATE PageTemplate;$contentCV[unique=true];uid[unique=true];name;frontendTemplateName;restrictedPageTypes(code);active[default=true]
;;CategoryPageTemplate;Category Page Template;addon:${addOnName}/pages/telco/category/${customCategoryJSP};CategoryPage
FYI, https://help.hybris.com/1808/hcd/8acf28c386691014a31dc2e54c3e98ec.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I guess need to add URL handler mapping is missing,
<property name="mappings">
<props>
<prop key="/url/**">controller_name</prop>
...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Add "addonsupport" in localextensions.xml and give a try.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, I'm facing the same. Did anyone solved this? Share it! :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello , I am facing similar issue. Kindly share if you were able to resolve the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We can use buildcallbacks as a hack to replace AbstractPageController with customized AbstractPageController
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.