AnsweredAssumed Answered

Issues in Drop Down widget in  Web Form

Question asked by dhavalprajapati on Mar 24, 2011
Hello,

I am facing below issue in drop down widget:

·         Create Web Form with XSD (language.xsd) which has a language dropdown.
·         Language XSD contains validation rule to select language.
                             Scenario 1 : (Pass)
·         Select any language (ex: English) and create content. It is working fine.
                             Scenario 2 : (Pass)
·         If a user does not select a language and leaves the default “Please select” option untouched, and tries to create the content, then the form gives a validation message (ex: Select Language) as expected.
                             Scenario 3 : (Fail)
·         A user selects any language (ex: English) and then changes it to default option “Please select”, and then tries to create the content. The content will be created with the value “Please select”, which is wrong.
·         Expected Result : The language dropdown should be validated before creating the content. Value “Please select” should always return validation error, even if user selects it after attempting to save with other value.


<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns:alf="http://www.alfresco.org"
           xmlns:wcm="http://www.alfresco.org/wcm"
           targetNamespace="http://www.alfresco.org/wcm"
           elementFormDefault="qualified">
        
   <xs:element name="Language">
           <xs:complexType>
            <xs:sequence>       
             <xs:element name="Language">
                  <xs:annotation>
                     <xs:appinfo>
                        <alf:appearance>minimal</alf:appearance>
                        <alf:label>Language</alf:label>
                        <alf:alert>Select Language</alf:alert>
                     </xs:appinfo>
                  </xs:annotation>            
                  <xs:simpleType>
                     <xs:restriction base="xs:normalizedString">
                        <xs:enumeration value="English"/>
                        <xs:enumeration value="Spanish"/>
                        <xs:enumeration value="Simplified Chinese"/>
                     </xs:restriction>
                  </xs:simpleType>
             </xs:element>  
            </xs:sequence>
           </xs:complexType>
   </xs:element>
</xs:schema>

Please let me know if is there any workaround to resolve this issue.

Outcomes