-
1. Re: Load Resources (JS & CSS) from a servlet
apanag Jan 26, 2010 8:56 AM (in response to apanag)Anyone?
Do I do something totally wrong or something?
I've seen a4j:loadScript and I do not see how it can be of help to me.
ok with LoadStyleStrategy or LoadScriptStrategy I avoid loading the resources.
<param-name>org.richfaces.LoadStyleStrategy</param-name>
<param-value>NONE</param-value>
but how do I access the resource?
thanks
-
2. Re: Load Resources (JS & CSS) from a servlet
apanag Jan 26, 2010 10:51 AM (in response to apanag)RichFaces offers the Scripts and Styles Strategy which is unfortunately not sufficient for my needs.
Why would I want to include the whole ui-library when I am only using a component at one page and many ui components at another?
Speed is very important, and maybe the user just reach only to the first page. Plus I want to keep the number of request to a minimum.
With the org.richfaces.LoadScriptStrategy set to ALL , my custom RF Components' JS files don't get loaded.
Is there any solution for the latter?
Something that I am missing?
My goal is write a filter / extend the RF functionallity in a way that:
1. it parses the whole page at the end of the rendering gathering the JS files
2. It combines (concatenates) all the JS files, creates a pack.js and caches it.
At the next request of this page, the pack.js is immediately available.
(same for the css)
Any ideas why I should not do that, or other solutions?
-
3. Re: Load Resources (JS & CSS) from a servlet
nbelaevski Jan 26, 2010 6:34 PM (in response to apanag)Please take a look: http://community.jboss.org/docs/DOC-133291 of 1 people found this helpful -
4. Re: Load Resources (JS & CSS) from a servlet
apanag Jan 28, 2010 4:07 AM (in response to nbelaevski)Thanks a lot Nick,
that solved most of my problems.
It^s kind of hard to spot the document.
Yes, now I know that there is stuff in the Articles, but when I search in the forum for that or google, I found null.
It's really a pitty, that even though so many cool features and they are hard to find.