I would like to set a default constant value to a particular value node in JiBX when the corresponding field value is null. Is this possible and if so, how?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can use the element 'default' ... for example:
<value name="YourElementName" field="fieldName" default="default-value" usage="optional" />
This is only allowed for 'optional' elements.
See the description here: http://jibx.sourceforge.net/details/binding-attributes.html#string