To all,

I still have a MyFaces 1.1.6/Tomahawk 1.1.10 in production, client not
giving the time to migrate to 2.X.

That said, I'm trying to add javascript to specific pages <head></head
section (security code to stop the page from being included in frames; <a
href="https://www.owasp.org/index.php/Cross_Frame_Scripting";>Cross_Frame_Scripting
).

Instead of just adding it to the pages between <f:verbatim></f:verbatim>
tags, I am trying to use org.apache.myfaces.renderkit.html.util.AddResource
to inject the CSS and JS (/analyze the directories and add it to specific
pages/).

I thought to do it in a phaseListener.

Problem is, I can't get it to work on the *initial reques*t, only on
*PostBacks* (/is it done in the *Apply Requests* phase/?).

Seems like I should be able to intercept the response and add this...I have
the Extensions Filter (Tomahawk) set up and have added ADD_RESOURCE_CLASS
(DefaultAddResource) to the context in web.xml.

Anyone have any thoughts?

I haven't posted a question in a long while...I would love to hear a
solution for this (/relatively/) Old School set up!

Thanks.







--
View this message in context: 
http://myfaces.10567.n7.nabble.com/addResource-to-add-CSS-JS-Only-working-on-PostBack-tp121593.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Reply via email to