[jboss-dev-forums] [Design of JBossXB] - Re: @XmlElement(defaultValue=

alex.loubyansky@jboss.com do-not-reply at jboss.com
Tue Oct 16 08:41:03 EDT 2007


But the element must still be present in the XML.

"jaxb20 spec" wrote : Element defaulting
  | The default value is derived from the element declaration?s {value
  | constraint} property?s value. Unlike attribute defaulting, an element only
  | defaults when there is an empty element tag in an xml document. The
  | element?s default value is captured by mapping annotation
  | @XmlElement.defaultValue(). The unmarshaller sets the
  | property to this default value when it encounters an empty element tag.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4095590#4095590

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4095590



More information about the jboss-dev-forums mailing list