Use a default. The Jibx <value> tag takes an default= attribute. This is only allowed on optional values (like you have) and if the optional value is missing, the corresponding set-method is called with the default. If you have the default attribute set to "missing" or some other out of bounds value, the Set-method now knows when to leave the value alone, and when to update it.
Tudor Olteanu wrote: > Since "null" is also a possible value for some fields, I can't assume > that null values are corresponding to missing fields. > > So what I need is a way to know if an optional field was/wasn't present > in xml. > > Thomas Jones-Low wrote: >> Using a existing object will require the use of the Factory attribute >> for the binding. This is a static method which returns the instance to >> be worked on. >> >> The original values to be kept will need a set-method rather than the >> default setter, to check for the null value and not update them. >> >> > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > jibx-users mailing list > jibx-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jibx-users > > -- Thomas Jones-Low Softstart Services Inc. [EMAIL PROTECTED] JobScheduler for Oracle Ph: 802-398-1012 http://www.softstart.com ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users