jsf 2.2 - Omnifaces CombinedResourceHandler order in POST and GET -
i'm using combinedresourcehandler alone
<application> <resource-handler>org.omnifaces.resourcehandler.combinedresourcehandler</resource-handler> </application>
with excluded resources:
<context-param> <param-name>org.omnifaces.combined_resource_handler_excluded_resources</param-name> <param-value> font-awesome/4.3.0/css/font-awesome.min.css </param-value> </context-param>
and have simple page:
<f:view contenttype="text/html" > <h:head> <h:outputstylesheet library="primefaces-bootstrap" name="theme.css" /> <h:outputstylesheet name="css/icons/icons.css"/> <h:outputstylesheet name="font-awesome/4.3.0/css/font-awesome.min.css" /> </h:head> <h:body> <o:form> <o:messages></o:messages> <h:inputtext required="true" id='somefield'/> <h:commandbutton></h:commandbutton> </o:form> </h:body> </f:view>
when request have css order (production mode):
<link type="text/css" rel="stylesheet" href="/travelc/javax.faces.resource/theme.css.xhtml?ln=primefaces-bootstrap"/> <link rel="stylesheet" type="text/css" href="/travelc/javax.faces.resource/enorkmrmtu1lte4t1k3kzy8plilkllaqyujntdvlli6uawl9zot8pcgjegma_hitwq.css.xhtml?ln=omnifaces.combined&v=1441782365350"/> <link rel="stylesheet" type="text/css" href="/travelc/javax.faces.resource/font-awesome/4.3.0/css/font-awesome.min.css.xhtml"/>
and when post:
<link type="text/css" rel="stylesheet" href="/travelc/javax.faces.resource/theme.css.xhtml?ln=primefaces-bootstrap"/> <link rel="stylesheet" type="text/css" href="/travelc/javax.faces.resource/font-awesome/4.3.0/css/font-awesome.min.css.xhtml"/> <link rel="stylesheet" type="text/css" href="/travelc/javax.faces.resource/enorkmrmtu1lte4t1k3kzy8plilkllaqyujntdvlli6uawl9zot8pcgjegma_hitwq.css.xhtml?ln=omnifaces.combined&v=1441782365350"/>
which breaks page. how can prevent happening?
i'm using omnifaces latest snapshot , myfaces 2.2.8
i reproduced it. myfaces plays role here. works fine mojarra.
on postback, combined resource still exists in component tree , had extracted , re-combined (just cover case resources conditionally added/removed during postback). however, due logic bug, combined resource newly created , added end instead of reusing earlier combined resource location found, confirming symptoms seeing. bug noticeable if you're excluding resources combining, causing there multiple resources. worked in mojarra because component id same.
the logic bug fixed per this commit , available per today's latest omnifaces 2.2 snapshot.
Comments
Post a Comment