Craig McClanahan wrote:
This part of the problem, at least, is pretty easy to deal with :-).  Call
FacesContext.setResponseWriter() -- perhaps after calling
getResponseWriter() to save the original one, if any -- in a "before render
response" phase listener, and do the inject-and-copy trick in the
corresponding "after render response" listener.

Ah-ha! That's what I was looking for :-) But isn't this approach what you suggested may not work well with, for example, JSPs, if any of the response is generated without going through the response writer?

Shale Remoting plays this sort of game to deal with asynchronous AJAX
callbacks.

It's on my TODO-list to look into Shale Remoting. It just got bumped up a bit ;-) Are you saying that Shale includes support for injecting references to static resources into a response, or just that it uses the technique above for whatever?

L.

Reply via email to