AnsweredAssumed Answered

Drop down

Question asked by lakshmi on Jun 19, 2007
Latest reply on Jun 21, 2007 by lakshmi
Hi,

Am creating my own xsd for attaching a web form to my web project.
I need to create drop down,text box etc..
I have problem with drop down. For options less than 5 i get radio button rather than a drop down

my code is as follows:

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns:pr="http://www.alfresco.org/alfresco/pr"
           targetNamespace="http://www.alfresco.org/alfresco/pr"
           elementFormDefault="qualified">


<xs:simpleType name="Subject">
    <xs:restriction base="xs:string">
      <xs:enumeration value="OperatingSystems"/>
      <xs:enumeration value="ProgrammingLanguages"/>
      <xs:enumeration value="Databases"/>
      <xs:enumeration value="ContentManagement"/>
      </xs:restriction>
  </xs:simpleType>


<xs:simpleType name="SubjectDetail">
    <xs:restriction base="xs:string">
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
      <xs:enumeration value="3"/>
      <xs:enumeration value="4"/>
      <xs:enumeration value="5">
      <xs:enumeration value="6"/>
     </xs:restriction>
  </xs:simpleType>

 
  <xs:element name="ncontent">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Name" type="xs:normalizedString" use="required"/>
        <xs:element name="Title" type="xs:normalizedString"/>
        <xs:element name="Description" type="xs:normalizedString"/>
         <xs:element name="Subject" type="pr:Subject"/>
       <xs:element name="SubjectDetail" type="pr:SubjectDetail"/>
     </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>


here Subject(only 4 options)is displayed as drop down and subjectDetail (6 options)is dispalyed as drop down.

Plz advice me how to display drop down…
I tried using , but had no effect:

<xs:element name="Subject" type="pr:Subject">
                <xs:annotation><xs:appinfo><alf:appearance>minimal</alf:appearance></xs:appinfo></xs:annotation>
              </xs:element>


FYI am using alfresco-community-tomcat-2.0.0 bundle.

Thanks,
Lakshmi

Outcomes