diff _test/Resources/form.schema @ 15:16795016e70b

Dom schema in progress
author Sergey
date Mon, 07 Sep 2009 17:30:55 +0400
parents 63f6653b094e
children 16ada169ca75
line wrap: on
line diff
--- a/_test/Resources/form.schema	Fri Sep 04 16:38:15 2009 +0400
+++ b/_test/Resources/form.schema	Mon Sep 07 17:30:55 2009 +0400
@@ -2,28 +2,57 @@
 <schema>
     <Include src="forms.schema"/>
     <Form
-        dataObject="App::Data::User"
+        type="Form"
         dataPolicy="AddOrUpdate"
-        messageMin="Вы не заполнили %Node.formLabel.%"
+        dataType="App::Data::User"
+        messageMin="Вы не заполнили %Node.formLabel_blame%"
     >
-        <EditBox nodeName="Name"
+        <Name
             formLabel="Имя"
-            formLabel.blame="имя"
-            formLabel.no="имени"
+            formLabel_blame="имя"
+            formLabel_no="имени"
+            type="EditBox"
         />
-        <EditBox nodeName="Nick"
+        <!-- Опциональный элемент -->
+        <Nick
             formLabel="Прозвище"
-            formLabel.no="прозвища"
+            formLabel_no="прозвища"
             minOccur="0"
+            type="EditBox"
         >
             <RegExp>\w{4,10}</RegExp>
-        </EditBox>
-        <ListBox nodeName="Role"
-            dataObject="App::Data::Role"
+        </Nick>
+        <Role
+            dataType="App::Data::Role"
             dataSource="roles"
             formLabel="Роль"
-            formLabel.blame="роль"
+            formLabel_blame="роль"
+            type="MultiSelect"
+            maxOccur="unbounded"
         />
+        <Contacts
+            minOccur="0"
+            maxOccur="unbounded"
+            formLabel="Контакты"
+            dataType="App::Data::Contacts"
+            type="Container"
+        >
+            <NodeSet>
+                <EMail
+                    type="EditBox"
+                    minOccur="0"
+                    formLabel="Эл. почта"
+                    formLabel_no="эл. почты"
+                />
+                <Phone
+                    type="EditBox"
+                    minOccur="0"
+                    formLabel="Телефон"
+                    formLabel_no="телефона"
+                />
+            </NodeSet>
+        </Contacts>
     </Form>
+    
 </schema>