[opencms-dev] Preset checkbox to default value TRUE
Manfred Roos
manfred_roos at web.de
Fri Mar 14 10:02:48 CET 2008
Hello,
I have written a xml-schema which uses some checkboxes but just do not succeed in setting a checkbox to "true" (checked) as the default state when adding a new data set.
I thought a simple codeline like
<default element="Checkbox_1" value="true" />
would do the task but it does not.
What is the trick? ( see code below)
Regards
Manfred
----- START ----------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd"/>
<xsd:element name="SubmittedBys" type="OpenCmsSubmittedBys"/>
<xsd:complexType name="OpenCmsSubmittedBys">
<xsd:sequence>
<xsd:element name="SubmittedBy" type="OpenCmsSubmittedBy" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OpenCmsSubmittedBy">
<xsd:sequence>
<xsd:element name="Test" type="OpenCmsString" />
<xsd:element name="Checkbox_1" type="OpenCmsBoolean" />
<xsd:element name="Checkbox_2" type="OpenCmsBoolean" />
<xsd:element name="Checkbox_3" type="OpenCmsBoolean" />
<xsd:element name="Checkbox_4" type="OpenCmsBoolean" />
</xsd:sequence>
<xsd:attribute name="language" type="OpenCmsLocale" use="optional"/>
</xsd:complexType>
<xsd:annotation>
<xsd:appinfo>
<layouts>
</layouts>
<defaults>
<default element="Test" value="At least one check box should be set"/>
<default element="Checkbox_1" value="true" />
<default element="Checkbox_2" value="TRUE" />
<default element="Checkbox_3" value="1" />
<default element="Checkbox_4" value='true' />
</defaults>
</xsd:appinfo>
</xsd:annotation>
</xsd:schema>
----- END ----------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20080314/bf814b7e/attachment.htm>
More information about the opencms-dev
mailing list