This is a problem with most of the tomahawk components, and I will
cross-post this answer on that list for those with the same issue
there. What happens is that by default the extension filter from
tomahawk adds all external JavaScript resources into the document head
on page render, but only if the component is rendered as it is the
renderer that adds the JS reference.

Now with partial-page AJAX frameworks, you can have components that
are not rendered the first time, but are after that. The problem is
that the HEAD is usually not in the part of the page that is being
refreshed. I was just banging my head on this one today.

I had thought, if I scoured the output of CSS & JS references and used
JS on the client to add SCRIPT and CSS tags to the head on the AJAX
load it would work. Unfortunately it only worked 50%. See, the browser
doesn't load those dynamically loaded SCRIPT & CSS tags until it is
"free" (testing in FF 1.5). So, any in-line javascript like the popup
that calls a "new" in a script, will not have access to the JS file
objects at that time.

The solution? I am not 100% sure, but I just bumped into a message
from tonight talking about the StreamingAddResource. I will be trying
this tomorrow. The benefit looks like it cause the JS to be inlined
into the body instead of being referenced in the head. The problem
would be that the browser would no longer be able to cache the JS
files for speed and each HTML response would therefore be larger.

I don't know much about StreamingAddResource and what myfaces/tomahawk
version it is in, but I will respond tomorrow if I can get it working.

On 12/13/06, mulmer <[EMAIL PROTECTED]> wrote:

Seems the tomahawk t:popup component stops working when the component is
rendered in any page except the 1st page referenced in a a4j:include
component.....

The home page of my application works fine and renders the popup as
expected...I then change the viewId of the a4j:include and any popup
components on this second page do not work...I return to the 1st page and
the original popup is not working now.

From what I can see...absolutely no JS from the popup component is rendered
the 2nd time around.

All the other Tomahawk components on the 1st page and any subsequent page
included by the a4j:include work just fine..

Anyone else experiencing this behavior?
TIA
--
View this message in context: 
http://www.nabble.com/a4j%3Ainlcude-and-t%3Apopup-tf2816904.html#a7862095
Sent from the Ajax4jsf users mailing list archive at Nabble.com.

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


Reply via email to