Changeset 913


Ignore:
Timestamp:
2008-12-02 15:58:53 (4 years ago)
Author:
bruno
Message:

representation builder:

  • adjust to common sample structure, introduce pages, common-samples, etc
  • error page styling is now customised to fit in the common-samples layout
Location:
trunk/samples/kauri-representationbuilder-sample
Files:
7 added
1 deleted
4 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/samples/kauri-representationbuilder-sample/kauri.xml

    r469 r913  
    1919  <modules> 
    2020 
    21     <artifact id="templateModule" groupId="org.kauriproject" artifactId="kauri-template-service-impl"> 
     21    <artifact id="templateModule" groupId="org.kauriproject" artifactId="kauri-template-service-impl"/> 
     22 
     23    <artifact id="routingModule" groupId="org.kauriproject" artifactId="kauri-routing-impl"/> 
     24 
     25    <artifact id="representationModule" groupId="org.kauriproject" artifactId="kauri-representationbuilder-impl"/> 
     26 
     27    <artifact id="blueprintcss" groupId="org.kauriproject" artifactId="kauri-blueprintcss"> 
     28      <mount name="main" path="/kauri/blueprintcss"/> 
    2229    </artifact> 
    2330 
    24     <artifact id="routingModule" groupId="org.kauriproject" artifactId="kauri-routing-impl"> 
    25     </artifact> 
     31    <artifact id="samples.common" groupId="org.kauriproject" artifactId="kauri-samples-common"> 
     32      <inject-restservice name="blueprintcss" ref="blueprintcss:main"/> 
    2633 
    27     <artifact id="representationModule" groupId="org.kauriproject" artifactId="kauri-representationbuilder-impl"> 
     34      <mount name="main" path="/samples/common"/> 
    2835    </artifact> 
    2936 
    3037    <artifact id="representationSample" groupId="org.kauriproject" artifactId="kauri-representationbuilder-sample"> 
    31       <mount name="router" path=""/> 
     38      <inject-restservice name="samples-common" ref="samples.common:main"/> 
     39 
     40      <mount name="main" path=""/> 
    3241    </artifact> 
    3342 
  • trunk/samples/kauri-representationbuilder-sample/src/main/kauri/representations.groovy

    r748 r913  
    4848 
    4949        exception (classes: ["org.kauriproject.representation.build.sample.SampleNotFoundException"]) { 
    50             template(src: "clap://thread/org/kauriproject/representation/defaulterrorpage.xml", statusCode: 404) 
     50            template(src: "module:/templates/errorpage.xml", statusCode: 404) 
    5151        } 
    5252 
     
    5656         */ 
    5757        exception { 
    58             template(src: "clap://thread/org/kauriproject/representation/defaulterrorpage.xml", statusCode: 500) 
     58            template(src: "module:/templates/errorpage.xml", statusCode: 500) 
    5959        } 
    6060    } 
  • trunk/samples/kauri-representationbuilder-sample/src/main/kauri/router.groovy

    r748 r913  
    11builder.router { 
    2     template(uri: "/", match: "equals", template: "module:/templates/index.xml", mediaType: "text/html") 
     2 
     3    directory(uri: "/static", root: "module:/static") 
    34 
    45    resource(uri: "/exception", match: "equals", ofClass: "org.kauriproject.representation.build.sample.ExceptionResource") 
    56 
    6     directory(uri: "/resources", root: "module:/resources/") 
    7  
    8     jaxRs(uri: "") { 
     7    jaxRs(uri: "", passThrough: true) { 
    98        jaxRsResource(scanPackages: "*") 
    109        jaxRsProvider(scanPackages: "*") 
    1110        jaxRsGroovyScripts(path: "groovy-jax-rs") 
    1211    } 
     12 
     13    pages(uri: "", root: "pages") 
     14 
    1315} 
  • trunk/samples/kauri-representationbuilder-sample/src/main/kauri/spring/services.xml

    r911 r913  
    1616 
    1717  <kauri:import-service id="templateService" service="org.kauriproject.template.service.TemplateService" /> 
     18  <kauri:import-service id="representationBuilder" service="org.kauriproject.representation.build.RepresentationBuilder"/> 
     19  <kauri:import-service id="routingService" service="org.kauriproject.routing.RoutingService"/> 
    1820 
    19   <kauri:import-service id="representationBuilder" service="org.kauriproject.representation.build.RepresentationBuilder"/> 
     21  <kauri:import-restservice name="samples-common"/>  
     22 
     23  <kauri:export-restservice ref="main"/> 
     24 
    2025  <bean factory-bean="representationBuilder" factory-method="install"> 
    2126    <constructor-arg ref="module"/> 
    2227  </bean> 
    2328 
    24   <kauri:import-service id="routingService" service="org.kauriproject.routing.RoutingService"/> 
    2529 
    26   <kauri:export-restservice ref="router"/> 
    27  
    28   <bean id="router" factory-bean="routingService" factory-method="createRouter"> 
     30  <bean id="main" factory-bean="routingService" factory-method="createRouter"> 
    2931    <constructor-arg ref="restletContext"/> 
    3032    <constructor-arg ref="module"/> 
  • trunk/samples/kauri-representationbuilder-sample/src/main/kauri/templates/helloworld.xml

    r452 r913  
    11<?xml version="1.0"?> 
    2 <html> 
    3   <head> 
    4     <title>Sample</title> 
    5   </head> 
    6   <body> 
     2<html t:inherit="module:/templates/layout/layout.xml" 
     3      xmlns:t="http://kauriproject.org/template"> 
     4 
     5  <t:block name="main"> 
    76    I got this message for you: ${message} 
    8   </body> 
     7  </t:block> 
     8   
    99</html> 
Note: See TracChangeset for help on using the changeset viewer.