myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leonardo Uribe <>
Subject Re: [core] why f:ajax render="@all" don't update <link> tags?
Date Tue, 11 Oct 2011 22:18:45 GMT
Hi Çağatay

Yes, there is no render="@head" or render="@body". Maybe it is
something to include in JSF 2.2.

So it is possible. I'll reopen MYFACES-3106. This issue is too
annoying. It is common that people try to use <ui:include src="#{...}"
/> or <c:if> and then <f:ajax> to update the content. If the content
add some .css or .js using @ResourceDependency over a
component/renderer or h:outputStylesheet/h:outputScript, the server
side ( in myfaces case
org.apache.myfaces.context.servlet.PartialViewContextImpl ) should
trigger <update id="javax.faces.ViewHead"> or <update
id="javax.faces.ViewBody"> automatically, and the javascript part of
myfaces should deal with this.

Thanks Çağatay for the comment.

@Werner : if you have time could you help me with this?


Leonardo Uribe

2011/10/11 Çağatay Çivici <>:
> Hi,
> PrimeFaces themeswitcher also manipulates link tags in head to load css
> without page refresh;
> One question, when <update id="javax.faces.ViewHead"> exists in partial
> response, there is no render="@head" right?
> Cheers,
> On 12.Eki.2011, at 00:23, Leonardo Uribe wrote:
> Hi
> Trying to fix MYFACES-3106, I notice that when an ajax request is
> triggered using <f:ajax render="@all"> for example, the javascript
> part that process the response does not check if new <link> tags has
> been added to <head> section, so if you have something dynamically in
> this part using combinations of <c:if> or <ui:include src="#{...}">
> and for example composite components using <h:outputStylesheet>, only
> the scripts are loaded but not the stylesheets.
> But looking on the internet I have found possible was to load .css
> files dynamically. For example see:
> There are other sites with some scripts that do the trick, adding a
> <link> node under <head>.
> My question is: it is possible to do something in this part to keep
> track of stylesheets loaded on <head> section and just load the ones
> required in a ajax request? If that so, I think we can do some
> modifications in myfaces code to check if a stylesheet was added and
> include a <update id="javax.faces.ViewHead"> section automatically.
> regards,
> Leonardo Uribe
> Çağatay Çivici
> Principal Consultant
> PrimeFaces Lead | JSF EG Member
> Prime Teknoloji
> Bilkent Cyberpark, A-303d
> 06800 Ankara/Turkey
> Tel: +90 312 265 05 07

View raw message