You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Bryan Lewis <br...@maine.rr.com> on 2005/12/08 22:23:22 UTC

Tap 3-to-4 conversion, question about startup hooks

I've been upgrading our Tap3 apps.  It's going okay so far but I'm stuck
on a couple of little initialization features, things we implemented
before with code in our custom Engine.  I'm feeling quite the noob when
it comes to the hivemind way of doing things.

In our old Engine we preloaded all the pages at the first request, to
check that there were no errors and to avoid delays later.  We hooked
into the startup sequence by overriding createVisit().  That method's
gone now, and so are others like createGlobal() and setupForRequest().
I tried a couple of probably-silly approaches -- hooking
requestInitialized() and even service() -- but I can't see a way to
do this in a place where I can get both a requestCycle and the
servletContext.


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


Re: Tap 3-to-4 conversion, question about startup hooks

Posted by Geoff Longman <gl...@gmail.com>.
One could use an immediate extension (application file)

<!ELEMENT extension (meta | configure)* >
<!ATTLIST extension
	name CDATA #REQUIRED
	class CDATA #REQUIRED
	immediate %attribute-flag; "no"
>

Still in Tap4 !

Geoff

On 12/10/05, Kent Tong <ke...@cpttm.org.mo> wrote:
> Bryan Lewis <bryan <at> maine.rr.com> writes:
>
> > In our old Engine we preloaded all the pages at the first request, to
> > check that there were no errors and to avoid delays later.  We hooked
> > into the startup sequence by overriding createVisit().  That method's
> > gone now, and so are others like createGlobal() and setupForRequest().
> > I tried a couple of probably-silly approaches -- hooking
> > requestInitialized() and even service() -- but I can't see a way to
> > do this in a place where I can get both a requestCycle and the
> > servletContext.
>
> If the first request is always for the page service, you may extend
> the PageService class and override its service() method. In the
> serivce() method you can get access to the request cycle and the
> servlet context (through injection). Then make a contribution
> to the tapestry.services.ApplicationServices configuration point.
>
> --
> Author of a book for learning Tapestry (http://www.agileskills2.org/EWDT)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


--
The Spindle guy.           http://spindle.sf.net
Get help with Spindle:   
http://lists.sourceforge.net/mailman/listinfo/spindle-user
Announcement Feed:    
http://www.jroller.com/rss/glongman?catname=/Announcements
Feature Updates:            http://spindle.sf.net/updates

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


Re: Tap 3-to-4 conversion, question about startup hooks

Posted by Kent Tong <ke...@cpttm.org.mo>.
Bryan Lewis <bryan <at> maine.rr.com> writes:

> In our old Engine we preloaded all the pages at the first request, to
> check that there were no errors and to avoid delays later.  We hooked
> into the startup sequence by overriding createVisit().  That method's
> gone now, and so are others like createGlobal() and setupForRequest().
> I tried a couple of probably-silly approaches -- hooking
> requestInitialized() and even service() -- but I can't see a way to
> do this in a place where I can get both a requestCycle and the
> servletContext.

If the first request is always for the page service, you may extend 
the PageService class and override its service() method. In the 
serivce() method you can get access to the request cycle and the 
servlet context (through injection). Then make a contribution 
to the tapestry.services.ApplicationServices configuration point.

--
Author of a book for learning Tapestry (http://www.agileskills2.org/EWDT)


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