Ce contenu n'est pas disponible dans la langue sélectionnée.
4.24. Pre-processing Example
This example provides a solution to a numeric decoding issue:
<!-- A bean property binding example: --> <jb:bean beanId="orderItem" class="org.milyn.javabean.OrderItem" createOnElement="price"> <jb:value property="price" data="price" decoder="Double"> <jb:decodeParam name="valuePreprocess">value.replace("_", "").replace("!", ".")</jb:decodeParam> </jb:value> </jb:bean>
<!-- A direct value binding example: --> <jb:value beanId="price" data="price" decoder="BigDecimal"> <jb:decodeParam name="valuePreprocess">value.replace("_", "").replace("!", ".")</jb:decodeParam> </jb:value>
The String data value is referenced in the expression via the value variable name. (The expression can be any valid MVEL expression that operates on the value String and returns a String.)