[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    [jira] Created: (XMLBEANS-442) provide setters for optional
From:       "Janick Reynders (JIRA)" <xmlbeans-dev () xml ! apache ! org>
Date:       2010-07-07 10:10:55
Message-ID: 13212093.237931278497455334.JavaMail.jira () thor
[Download RAW message or body]

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-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic