2 Replies Latest reply: May 18, 2012 2:26 AM by Tomasz Kurpios RSS

Are there any plans to restore "adding resources after AJAX request" functionality?

Tomasz Kurpios Newbie

Quoting the extract from official documentation (3.5 Restrictions):

 

JSF 2 does not allow resources such as JavaScript or Cascading Style Sheets (CSS) to be added if the element requiring the resource is not initially present in the JSF tree. As such, components added to the tree via Ajax must have any required resources already loaded. In RichFaces, any components added to the JSF tree should have components with corresponding resources included on the main page initially. To facilitate this, components can use the rendered="false" setting to not be rendered on the page.

 

Setting rendered="false" is OK when components are in the tree. However, since we have sometimes two thousand components on a single page, for performance reasons we exclude parts by means of <c:if> or <c:choose> tags.

That's at least what we did in 3.3.3. It worked fine back then. However, it won't work in RichFaces 4.*. We're in the middle of migration to RichFaces 4.* and it would be great to know if there are any plans to restore this functionality.