myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <>
Subject Re: [RESOLVED] How to add inline javascript in application phase?
Date Thu, 29 Mar 2007 00:00:19 GMT
Ahh..yes, that looks right. StreamingAddResource does try to write it 
immediately (and therefore doesn't really support that ResourcePosition 
parameter). And that means that it cannot be used from the 
invoke-application phase to register stuff to be output later.

Perhaps you could update the wiki with that info?

Carsten Kaiser wrote:
> Ok, I guess I figured out the reason, which causes the solution suggested on the Wiki
page to fail:
> In our web application class StreamingAddResource is configured to be used to add resources
like JavaScript, CSS etc. to the response, which attempts to write any resource immediately
to the response writer. The DefaultAddResource class instead holds a set for each supported
resource position wherein all added resources are kept until they are rendered on completion
of the render response phase. So later implementation only allows to control popup triggering
within the invoke application phase!
> Regards,
> CAK  
> -----Ursprüngliche Nachricht-----
> Von: Carsten Kaiser [] 
> Gesendet: Mittwoch, 28. März 2007 06:10
> An: MyFaces Discussion
> Betreff: AW: How to add inline javascript in application phase?
> Hello Simon,
> thank you very much for his hint. I really could have thought about 
> looking for any other value of resource position! I will give it a try! 
> Hope, that BODY_ONLOAD will not ask for the ResponseWriter...
> Regards,

View raw message