Changed default for the optional attribute on the implements element from false to true, because as is ALL attributes are being set to optional, which I think is not normally what is wanted and I bet there have been a few surprises and frustrations from this

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@514243 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
David E. Jones
2007-03-03 21:13:17 +00:00
parent 34d858166a
commit 8bc8a3f460
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -185,7 +185,8 @@ under the License.
</xs:element>
<xs:attributeGroup name="attlist.implements">
<xs:attribute type="xs:string" name="service" use="required"/>
<xs:attribute name="optional" default="true">
<xs:attribute name="optional" default="false">
<xs:annotation><xs:documentation>If set to true all attributes inherited will have be optional whether or not they were in the implemented service definition.</xs:documentation></xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="true"/>
@@ -426,7 +426,7 @@ public class ModelServiceReader implements Serializable {
while (implIter.hasNext()) {
Element implement = (Element) implIter.next();
String serviceName = UtilXml.checkEmpty(implement.getAttribute("service"));
boolean optional = UtilXml.checkBoolean(implement.getAttribute("optional"), true);
boolean optional = UtilXml.checkBoolean(implement.getAttribute("optional"), false);
if (serviceName.length() > 0)
service.implServices.add(new ModelServiceIface(serviceName, optional));
//service.implServices.add(serviceName);