on 2020 Jul 27 10:13 PM
We use successfully several commerce provided beans to help configure our backoffice configuration inside mybackoffice-backoffice-config.xml including the following:
<wz:assignproperty="newProduct.catalogVersion"value="@catalogVersionService.getCatalogVersion('myProductCatalog', 'Staged')"/>
<wz:assignproperty="newPrice.currency"value="@commonI18NService.getCurrency('USD')"/>
<wz:assignproperty="newPrice.unit"value="@unitService.getUnitForCode('pieces')"/>
<wz:assignproperty="newStockLevel.warehouse"value="@warehouseService.getDefWarehouse().get(0)"/>
All the above work great and help us set default values when customizing create-wizards. However, we would like to be able to use our own custom services for similar needs. For example:
<wz:assignproperty="newProduct.name"value="@myCustomService.getName('myInput')"/>
However, even if we define myCustomService as a bean inside mybackoffice-spring.xml or mybackoffice-backoffice-spring.xml it seems this is not available to the Spring context used by backoffice when processing mybackoffice-backoffice-config.xml.
Are there special configuration steps necessary to allow a custom bean/service to be accessible by config.xml? I could not find any special setup for the above OOTB beans that are working fine.
To use your own beans there you need to add your bean to the property
platformbackoffice.available.bean.names.for.spel=labelService,enumerationService,exceptionTranslationService,productCodeGenerator
See "hybris\bin\ext-platform-backoffice\platformbackoffice\project.properties"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
29 | |
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.