-
1. Re: Issue with dependent resource loading in dynamically created components in Richfces4
bleathem Jun 18, 2013 1:39 PM (in response to piyush.mnnit)Are you adding the component to the component tree? In what phase are you doing that? JSF Resource handlind should take care of the resource loading for you, I'm surprised it's not working.
One possibility is to use RichFaces 4 resource optimization to load single minified CSS and JS files with resources for all components present. This way, your resources are present regardless of whether or not the specific component that called for them are present. Read up on how to do this here:
http://lukas.fryc.eu/blog/2012/02/optimizing-resource-loading-with.html
-
2. Re: Issue with dependent resource loading in dynamically created components in Richfces4
piyush.mnnit Jun 19, 2013 2:13 AM (in response to bleathem)I am adding via ajax thats why it is not loading dependent resources.
when I am adding resource optimization, page is even worse. It is unable to load any css or JS.
I have added below code in web.xml, please let me know if we have to do some extra configuration.
<servlet>
<servlet-name>Resource Servlet</servlet-name>
<servlet-class>org.richfaces.webapp.ResourceServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Resource Servlet</servlet-name>
<url-pattern>/org.richfaces.resources/*</url-pattern>
</servlet-mapping>
<context-param>
<param-name>org.richfaces.resourceOptimization.enabled</param-name>
<param-value>true</param-value>
</context-param>
-
3. Re: Issue with dependent resource loading in dynamically created components in Richfces4
bleathem Jun 21, 2013 6:23 PM (in response to piyush.mnnit)We use the resource optimisation in the RichFaces showcase, have a look there to see if you are missing anything: