provide setters for optional elements that check for null argument (help not rendering of optional elements) ------------------------------------------------------------------------------------------------------------
Key: XMLBEANS-442 URL: https://issues.apache.org/jira/browse/XMLBEANS-442 Project: XMLBeans Issue Type: Improvement Affects Versions: Version 2.4 Reporter: Janick Reynders from issue XMLBEANS-220 it is clear that XMLBeans will generate an optional element declared as nillable="false" with nil="true" when the setter of the element is called with null as an argument. If a user doesn't want the (optional) element to appear in the XML (because the XML has to validate against a schema) then he has to call unset..() explicitly or never call the setter at all. This litters the code of the user with null checks. It would be nice if XMLbeans generates an extra setter which calls unset..() automatically if the argument is null and call the regular setter if the argument is not null. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@xmlbeans.apache.org For additional commands, e-mail: dev-h...@xmlbeans.apache.org