on 03-07-2018 4:23 PM
Hey guys,
Trying to use a custom bean using @beanId in y: label, label expression in myext-backoffice-config.xml for a certain type Gave the spring definition in myext-backoffice-spring , But it seems that the bean is not accessible since label comes as empty. No errors in console.
Is there anything missing here ??
Any idea how can I use a custom bean in label expression?
Any help is much appreciated
myExtension-backoffice-config.xml
<y:base>
<y:labels>
<y:label>code+' - '+@labelService.getObjectLabel(user) + ' - '+ @myDateTimeLabelProvider.getLabel(date) +' -
'+totalPrice+' '+currency.isocode+' - '+status</y:label>
</y:labels>
</y:base>
</context>
myExtension-backoffice-spring.xml
Hi,
Expression you provide is resolved by some Backoffice mechanism that in the end uses SpEL. Nevertheless the environment in which the SpEL is resolved is sandboxed for security reasons. In you custom implementation, you may extend it and add some beans that should be accessible there. You can either use local.properties
to define platformbackoffice.available.bean.names.for.spel
parameter as a ,
-separated list of bean names (be aware that you may override some other values in this way!). You can also use list-extender
to add your own bean name to availableBeanNames
list property of fixedBeanResolver
bean.
Cheers, Jacek
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.