[opencms-dev] OpenCms 8.5: Why is the CategoryWidget a required field by default?

Tobias Karrer kartobi at gmail.com
Wed Jan 23 12:37:15 CET 2013


Default is minOccurs="1" and maxOccurs="1" so
<xsd:element name="TopTeaser" type="OpenCmsCategory" minOccurs="1" 
maxOccurs="1" />
in your case.

Try
<xsd:element name="TopTeaser" type="OpenCmsCategory" minOccurs="0" />

Regards,
Tobias

Am 23.01.2013 11:17, schrieb Schliemann, Kai:
> Hi list,
> I found a strange behavior while using the CategoryWidget in my schema.
> First of all, this is how my schema looks like:
> ...
> <xsd:element name="TopTeaser" type="OpenCmsCategory" />
> ...
> <layout element="TopTeaser" widget="CategoryWidget" configuration="category=agencies/" />
> ...
> <validationrules/>
> ...
>
> As you can see, the element is not defined as required field.
> Nevertheless, OpenCms marks this field as required (the label of the field is in red color).
>
> The most disturbing thing is, that I can save and close the file without a further warning.
> BUT, if I do not select a category in this field, the whole content is not saved.
>
> This behavior can't be intentional. I assume, this is a bug.
> Can anybody confirm this behavior or give me hint on how to solve this issue?
>
> Thanks in advance.
>
> Regards
> Kai
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20130123/5e71ab28/attachment.htm>


More information about the opencms-dev mailing list