cancel
Showing results for 
Search instead for 
Did you mean: 

Fill combobox with content

cotech
Champ in-the-making
Champ in-the-making
Hello,

i have a little problem to solve the following problem.

Now i have a xsd file to design or define my WebForms.

e.g:

<xs:complexType name="MyType">
      <xs:sequence>
         <xs:element name="name" type="xs:normalizedString"          minOccurs="1"    maxOccurs="1" />
         
         <xs:element name="title" type="xs:normalizedString"    minOccurs="1"    maxOccurs="1" />
         

         
      </xs:sequence>
   </xs:complexType>

Now i want to place a combobox and fill it with the content witch i have uploaded.

My problem is, that i dont know how i get the content names into the combo box?

I have loocked into the alfresco developers gueide and wiki but i havent found anything.

Maybe someone can help me.

Thanks
Cotech
3 REPLIES 3

lilyh
Champ in-the-making
Champ in-the-making
You can use a simple type to list what you want to insert in your combo box.
E.g.

<xs:simpleType name="colour">
  <xs:restriction base="xs:string">
    <xs:enumeration value="red"/>
    <xs:enumeration value="white"/>
    <xs:enumeration value="blue"/>
  </xs:restriction>
</xs:simpleType>

Then use this simple type and set the appearance to minimal to display it as a combo box.

<xs:element name="colour" type="ns:colour">
  <xs:annotation>
    <xs:appinfo>
      <alf:appearance>minimal</alf:appearance>
    </xs:appinfo>
  </xs:annotation>
</xs:element>

Think that's the way it's done, typed it up off the top of my head so you might need to play around with it a little to get it working.
Hope it helps.

cotech
Champ in-the-making
Champ in-the-making
Hi lilyh,

thanks for your support.

Now i know how i can add static content in my XSD Schema.
But how i can add dynamic content to my XSD ?

What i want to do is, that i want to add the names of my created web contents. In the documentation i haven't found something like this.
I create WebContent A and at a later moment i want to create another WebContent B. The WebContent B must included a list of all WebContent A.

My problem is, that i don't know how i can put these information in my XSD ???

Regards
CoTech

cotech
Champ in-the-making
Champ in-the-making
Hi all,

now i found a solution for my problem.

The solution is, that i have to create a xsd File on the fly with a WebScript.
Im my WebForm XSD i can include the WebScript witch will create the xsd File with my Content Names.