Set nillable value by final but not constant value
Foo.java @XmlElementWrapper(name = “Foos”, nillable = Config.FOO_NILLABLE) @XmlElement(name = “Foo”) public List<String> foos; Config.java public static final Boolean FOO_NILLABLE = true; // works public static final Boolean FOO_NILLABLE = loadConfigValueFromDatabase(); // doesn’t work – attribute value must be constant Desired outcome when foos null (or empty) config = true <parent> <foos xs:nil=”true”> </parent> config = […]
Set nillable value by final but not constant value
Foo.java @XmlElementWrapper(name = “Foos”, nillable = Config.FOO_NILLABLE) @XmlElement(name = “Foo”) public List<String> foos; Config.java public static final Boolean FOO_NILLABLE = true; // works public static final Boolean FOO_NILLABLE = loadConfigValueFromDatabase(); // doesn’t work – attribute value must be constant Desired outcome when foos null (or empty) config = true <parent> <foos xs:nil=”true”> </parent> config = […]
Set nillable value by final but not constant value
Foo.java @XmlElementWrapper(name = “Foos”, nillable = Config.FOO_NILLABLE) @XmlElement(name = “Foo”) public List<String> foos; Config.java public static final Boolean FOO_NILLABLE = true; // works public static final Boolean FOO_NILLABLE = loadConfigValueFromDatabase(); // doesn’t work – attribute value must be constant Desired outcome when foos null (or empty) config = true <parent> <foos xs:nil=”true”> </parent> config = […]
Set nillable value by final but not constant value
Foo.java @XmlElementWrapper(name = “Foos”, nillable = Config.FOO_NILLABLE) @XmlElement(name = “Foo”) public List<String> foos; Config.java public static final Boolean FOO_NILLABLE = true; // works public static final Boolean FOO_NILLABLE = loadConfigValueFromDatabase(); // doesn’t work – attribute value must be constant Desired outcome when foos null (or empty) config = true <parent> <foos xs:nil=”true”> </parent> config = […]
Set nillable value by final but not constant value
Foo.java @XmlElementWrapper(name = “Foos”, nillable = Config.FOO_NILLABLE) @XmlElement(name = “Foo”) public List<String> foos; Config.java public static final Boolean FOO_NILLABLE = true; // works public static final Boolean FOO_NILLABLE = loadConfigValueFromDatabase(); // doesn’t work – attribute value must be constant Desired outcome when foos null (or empty) config = true <parent> <foos xs:nil=”true”> </parent> config = […]
Set nillable value by final but not constant value
Foo.java @XmlElementWrapper(name = “Foos”, nillable = Config.FOO_NILLABLE) @XmlElement(name = “Foo”) public List<String> foos; Config.java public static final Boolean FOO_NILLABLE = true; // works public static final Boolean FOO_NILLABLE = loadConfigValueFromDatabase(); // doesn’t work – attribute value must be constant Desired outcome when foos null (or empty) config = true <parent> <foos xs:nil=”true”> </parent> config = […]