0. Re: How can i Disable Richfaces styles and scripts loading in a specific page ?
ilya_shaikovsky May 5, 2010 10:45 AM (in response to romyo0o)It's possible for example by setting Styles and scripts load strategies to DEFAULT. but in this case at pages whre you using RF components you will get numerous resources requests instead of single pack request. B.t.w. fetched once - resource pack cached. So if this really critical for your application?
And the best solution if you really need to turn them of at all for some pages - define strategies as NONE. then create two templates one which will be used for pages with RF components and the other for pages where not. At first template you should manually load resources using loadScript and loadStyle.
-
1. Re: How can i Disable Richfaces styles and scripts loading in a specific page ?
romyo0o May 6, 2010 5:34 AM (in response to ilya_shaikovsky)I've tried to add in my web.xml but still some scripts and styles loaded,
<context-param> <param-name>org.richfaces.LoadStyleStrategy</param-name> <param-value>DEFAULT</param-value> </context-param> <context-param> <param-name>org.richfaces.LoadScriptStrategy</param-name> <param-value>DEFAULT</param-value> </context-param>
and how can i make it manually in all pages ?thanks
-
2. Re: How can i Disable Richfaces styles and scripts loading in a specific page ?
ilya_shaikovsky May 6, 2010 5:49 AM (in response to romyo0o)1) yes, with default strategy scripts which are required by the current page components should be loaded.
2) check loadStyle loadScript at richfaces-demo. them designed to fetch resources from jar's so you will be able to load our scripts and styles manually where need.
-
3. Re: How can i Disable Richfaces styles and scripts loading in a specific page ?
romyo0o May 6, 2010 5:54 AM (in response to ilya_shaikovsky)1- But Ilya the page i'm talking about doesn't contain any richfaces component and i removed the tag lib also.
-
4. Re: How can i Disable Richfaces styles and scripts loading in a specific page ?
ilya_shaikovsky May 6, 2010 6:32 AM (in response to romyo0o)1 - if you using standard skinning - it has script dependency.
-
6. Re: How can i Disable Richfaces styles and scripts loading in a specific page ?
romyo0o May 11, 2010 10:23 AM (in response to ilya_shaikovsky)Thanks Ilya for your Help
I got that i can't disable styling for specific page.
I can just disable for all pages and enable for specific page.
am i right ?