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

Tobias Karrer kartobi at gmail.com
Wed Jan 23 15:39:34 CET 2013


Ok - I thought about your sentence "the element is not defined as 
required field"...

I haven't stated a validation rule either and get the error message. But 
I can't save and close until a categroy is chosen.

And with ADE I got the problem, when creating a new detail page, the 
category select box is not visible so I can't select any value.
When trying to save, the error message and the selectbox appears.
(I think this is the according Github issue, but the screenshot got lost 
when the issue was transferred from the old bugtracker: 
https://github.com/alkacon/opencms-core/issues/36)

Maybe there's some relation.

Best,
Tobias

Am 23.01.2013 13:04, schrieb Schliemann, Kai:
>
> Hi Tobias,
>
> thanks for your answer.
>
> good point.
>
> BUT:
>
> 1.I defined several other fields (e.g. OpenCmsString fields) in the 
> same way. They are not marked in red color and I can still save my 
> file and the values are saved as well.
>
> 2.I haven't defined a validation rule. So I expect OpenCms to save the 
> field without error, because the element exists, it is just empty.
>
> So I stick to my opinion, that this seems to be a bug.
>
> Am I right or wrong?
>
> Best regards
>
> Kai
>
> *Von:*opencms-dev-bounces at opencms.org 
> [mailto:opencms-dev-bounces at opencms.org] *Im Auftrag von *Tobias Karrer
> *Gesendet:* Mittwoch, 23. Januar 2013 12:37
> *An:* The OpenCms mailing list
> *Betreff:* Re: [opencms-dev] OpenCms 8.5: Why is the CategoryWidget a 
> required field by default?
>
> 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
>
>       
>
>       
>
>       
>
>
>
> _______________________________________________
> 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/f3218173/attachment.htm>


More information about the opencms-dev mailing list