Mercurial > pub > Impl
diff _test/Resources/sample.xml @ 221:e997e6fbac0b
sync: working on resources schema
author | sergey |
---|---|
date | Fri, 24 Aug 2012 16:24:14 +0400 |
parents | 5c82c15b25b1 |
children | 84a6382b49c8 |
line wrap: on
line diff
--- a/_test/Resources/sample.xml Thu Aug 23 17:44:31 2012 +0400 +++ b/_test/Resources/sample.xml Fri Aug 24 16:24:14 2012 +0400 @@ -1,21 +1,39 @@ <?xml version="1.0" encoding="UTF-8"?> -<resources xmlns="http://implab.org/schemas/resources" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://implab.org/schemas/resources resources.xsd "> - <root> - <get> - <bind text="model"/> - <result xsi:type="redirectResult"> - <locator> - <var name="id" text="model.id"/> - <var name="parent" text="parent.location"/> - <template>$parent/$id</template> - </locator> - </result> - </get> - </root> - <typeMap> - <item></item> - <item></item> - </typeMap> - <locators> - </locators> +<resources xmlns="http://implab.org/schemas/resources" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://implab.org/schemas/resources resources.xsd "> + <root> + <get> + <bind text="model" /> + </get> + + <resource name="projects"> + <contract> + <get> + <bind text="parent.model.projects" /> + </get> + <post> + <bind text="parent.model.CreateProject($form)"> + <var name="form" text="request"/> + </bind> + </post> + </contract> + </resource> + </root> + <typeMap> + <item></item> + <item></item> + </typeMap> + <locators> + <locator name="relative"> + <var name="id" text="model.id" /> + <var name="parent" text="parent.location" /> + <template>$parent/$id</template> + </locator> + <locator name="projects"> + <var name="id" text="model.id" /> + <var name="projects" text="application.locate('projects')" /> + <template>$projects/$id</template> + </locator> + </locators> </resources> \ No newline at end of file