Steve Shucker wrote:
> I'm really fishing for a hivemind guru to tell me how to inject some
> code in the tail end of the WebRequestServicer.service() method.

Looks like something similar was discussed here:

http://www.mail-archive.com/[EMAIL PROTECTED]/msg00316.html

Howard mentioned a possible feature addition to support this, and the original
poster said that he would add a JIRA issue, but I wasn't able to locate it if 
it was
ever added.

This would come in handy for something unrelated... I'm implementing your
WebRequestServicerFilter that handles synchronization for non-asset requests, 
but
your code doesn't detect asset requests if friendly URLs (AssetEncoder) are 
enabled.
I tried my best to find a way to leverage Tapestry's existing code to determine
which service was scheduled for a particular request, but the only thing that 
can
determine that is the IRequestCycle, and this isn't available in a
WebRequestServicerFilter.  I had to resort to code similar to yours that 
handles the
scheme AssetEncoder uses, but this code is fragile; if a new encoding method is
employed the filter will not be able to detect asset requests.  Oh well, for 
now the
kludge will have to do, I suppose.

> I'd consider a
> dedicated session in pageBeginRender of my error page (with some
> extra error handling) to set up the state for your error page.

Thanks, but that won't work for two reasons: (1) I don't have an error page as 
such,
many pages may need to handle these types of constraint violations, and 
sometimes
only when certain listeners are called, and (2) that would require me to 
basically
have two copies of all my persistent objects, one copy for each session.  I'd 
rather
manually eager fetch everything that my template is going to need before 
attempting
the commit than to do that...


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to