Craig Pugsley a écrit : > Hi all, > > We're trying to create a field for a custom document type that includes > a drop-down list of options for the user to select from. To do this, I'm > creating an element in our schema with a new simple type defined as a > xml-schema restriction of enumerations of strings. For example: > > <?xml version="1.0"?> > <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" > targetNamespace="http://my.company.com" xmlns:pm="http://my.company.com"> > <xsd:element name="Name" type="xsd:string"/> > <xsd:element name="Version" type="xsd:string"/> > <xsd:element name="Content" type="xsd:string"/> > <xsd:element name="Type" type="pm:pmDocType"/> > <xsd:simpleType name="pmDocType"> > <xsd:restriction base="xsd:string"> > <xsd:enumeration value="Option 1"/> > <xsd:enumeration value="Option 2"/> > <xsd:enumeration value="Option 3"/> > <xsd:enumeration value="Option 4"/> > </xsd:restriction> > </xsd:simpleType> > </xsd:schema> > > ...and I'm creating a new widget under the > 'org.nuxeo.ecm.platform.types.TypeService' extension point 'types': > > <widget jsfcomponent="h:selectOneListbox" schemaname="MyDocType" > fieldname="Type" required="true"/> > > ...however, when I deploy this into Nuxeo, the JSF component isn't > rendered on the page (please see attached screen shot for illustration). > > I'm using v5.1 M3 Nuxeo. > > Am I doing something wrong here?
The list of options is not handled by the schema but by a directory with schema "vocabulary". Take a look a the document_metadata_edit.xhtml and matching directory configuration in nuxeo-webapp-core. -- Olivier _______________________________________________ ECM mailing list [email protected] http://lists.nuxeo.com/mailman/listinfo/ecm
