on ‎2018 Nov 12 8:02 AM
I have to redefine an OOTB item as catalog version aware and would like to provide default value for the mandatory catalog version field.
Is there a way to inject the default value, a bit like
<attributes>
<attribute qualifier="systemVersion" type="ClassificationSystemVersion">
<modifiers optional="false" unique="true"/>
<persistence type="property"/>
<defaultvalue>catalogVersionService.getCatalogVersion("catalogName", "1.0")</defaultvalue>
</attribute>
</attributes>
Request clarification before answering.
Hi Shubham,
You can try this-
((de.hybris.platform.catalog.CatalogVersionService) de.hybris.platform.core.Registry.getApplicationContext().getBean("catalogVersionService")).getCatalogVersion("catalogName","1.0")
Another approach could be using InitDefaultsInterceptor, I hope you have already considered it.
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 2 | |
| 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.