beanio customhandler get value from different field

790 views Asked by At

I have one beanio xml file, the record example is like this:

<record name="dealsRecord" order="3" class="map">
    <field name="RedemptionMode"  required="true" maxLength="6"/>
    <field name="ConversionRate" required="false" maxLength="10" typeHandler="ynHandler"/>
</record>   

in the "ynHandler", I want to use "RedemptionMode" value, then I will do some logic with "RedemptionMode" and "ConversionRate".

Is anyone know how to write the handler to get value from "RedemptionMode"?

Thanks!

1

There are 1 answers

0
Alexander Petrov On

What you want is not possible. What you can do though is to write a type handler for the dealsRecord and from there decide how to format the entire string ( both the RedemptionMode and the ConversionRate)