You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Radu Preotiuc-Pietro (JIRA)" <xm...@xml.apache.org> on 2008/04/22 22:43:21 UTC

[jira] Resolved: (XMLBEANS-279) Add convenience XmlOptions setter methods with boolean arguments

     [ https://issues.apache.org/jira/browse/XMLBEANS-279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Radu Preotiuc-Pietro resolved XMLBEANS-279.
-------------------------------------------

       Resolution: Fixed
    Fix Version/s: TBD

I have added a new class, XmlOptionsBean (revision 646955). This extends XmlOptions so it can be used in its place and has JavaBean accessors, sets and gets. I hope it will prove useful.


> Add convenience XmlOptions setter methods with boolean arguments
> ----------------------------------------------------------------
>
>                 Key: XMLBEANS-279
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-279
>             Project: XMLBeans
>          Issue Type: Improvement
>          Components: XmlObject
>    Affects Versions: Version 2.2
>            Reporter: Niels Ull Harremoës
>            Priority: Minor
>             Fix For: TBD
>
>
> I would suggest that XmlOptions was extended with convenience methods like 
>   public XmlOptions setSavePrettyPrint(boolean flag)
> for all the no-arg setters.
> This would also allow us to do stuff like
>    XmlOptions customOptions = new XmlOptions(standardOptions).setSavePrettyPrint(false);
> There is currently no elegant way of turning off options.
> In addition, this would allow us to configure XmlOptions as part of our spring configuration. For example:
> <bean name="saveXmlOptions" class="org.apache.xmlbeans.XmlOptions">
>    <property name="saveNamespacesFirst" value="true">
>    <property name="savePrettyPrint" value="true">
> </bean>
> This is not currently possible, since the spring cannot call no-arg setters, so we have to use a custom BeanFactory.

-- 
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