tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ice96 <ice...@gmail.com>
Subject groovy grails and tapestry 5 integration experiments
Date Sat, 03 May 2008 14:00:04 GMT

Hello,
 I' m traing to integrate tapestry 5 in grails. I read in this 
http://www.troymaxventures.com/search/label/grapestry this   blog how to
integrate tapestry 4. At the moment my problem that tapestry does not have
org.apache.tapestry.ApplicationServlet and I can't bind .tml files.

grails plugin looks like this:


class Tapestry5GrailsPlugin {
 def version = 0.1
 def dependsOn = [:]
 // This removes the Grails standard controllers plugin, which means that
standard Grails actions and such would not work anymore.
 def evicts=['controllers']

 def doWithSpring = {
  // TODO Implement runtime spring config (optional)
 }   
 def doWithApplicationContext = { applicationContext ->
  // TODO Implement post initialization spring config (optional)  
 }
 def doWithWebDescriptor = { xml ->
  

			/*
def servlets = xml.servlet[0]
   	        servlets + {
                servlet {
                   'servlet-name'('tapestryapplication')
                   'servlet-class'('org.apache.tapestry.ApplicationServlet')
                   'load-on-startup'(1)
               }
        }






		def mappings = xml.'servlet-mapping'[0]
               mappings + {
                 'servlet-mapping' {
                       'servlet-name'('tapestryapplication')
                       'url-pattern'('/app')
                  }
                   'servlet-mapping' {
                       'servlet-name'('tapestryapplication')
                       'url-pattern'('*.html')
                  }
                  'servlet-mapping' {
                       'servlet-name'('tapestryapplication')
                       'url-pattern'('*.direct')
                  }
                   'servlet-mapping' {
                       'servlet-name'('tapestryapplication')
                       'url-pattern'('*.sdirect')
                  }
                   'servlet-mapping' {
                       'servlet-name'('tapestryapplication')
                       'url-pattern'('*.svc')
                  }
                   'servlet-mapping' {
                       'servlet-name'('tapestryapplication')
                       'url-pattern'('/assets/*')
                  }
               }

*/

	 def contextParam = xml.'context-param'[0]
   	 contextParam + { 'context-param' {
        'param-name'('tapestry.app-package')
        'param-value'('org.tapestry.myapp')
    }}


           def filter = xml.filter[0]
    filter + {
        'filter-name'('app')
        'filter-class'('org.apache.tapestry.TapestryFilter')  
    }

    def filterMapping = xml.'filter-mapping'[0]
    filterMapping + {
        'filter-name'('app')
        'url-pattern'('/*')
    }



 }



		






 def doWithDynamicMethods = { ctx ->
  // TODO Implement additions to web.xml (optional)
 } 
 def onChange = { event ->
  // TODO Implement code that is executed when this class plugin class is
changed  
  // the event contains: event.application and event.applicationContext
objects
 }                                                                                  
 def onApplicationChange = { event ->
  // TODO Implement code that is executed when any class in a
GrailsApplication changes
  // the event contain: event.source, event.application and
event.applicationContext objects
 }
}



Has anyone ideas?

-- 
View this message in context: http://www.nabble.com/groovy-grails-and-tapestry-5-integration-experiments-tp17035475p17035475.html
Sent from the Tapestry - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Mime
View raw message