Re-open.
Mark has discovered that the @MandatoryResourceComponent annotations are being handled differently than the regular @ResourceDependency processing. The @MandatoryResourceComponent ones are getting the "&v=1255606960" appended, but not the @ResourceDependency ones for the component actually on the page.
Details:
With the icefaces 3 application I had this mandatoryResourceConfiguration in my web.xml, and then visited the ace:dateTimeEntry page.
<context-param>
<param-name>org.icefaces.mandatoryResourceConfiguration</param-name>
<param-value>org.icefaces.ace.component.accordion.Accordion org.icefaces.ace.component.celleditor.CellEditor org.icefaces.ace.component.contextmenu.ContextMenu org.icefaces.ace.component.dataexporter.DataExporter </param-value>
</context-param>
These are the redundant pairs of javascript that I found. They correspond to the @ResourceDependency annotations for dateTimeEntry, the component on the page. This shows that the @MandatoryResourceComponent annotations are being handled differently than the regular @ResourceDependency processing. The @MandatoryResourceComponent ones are getting the "&v=1255606960" appended, but not the @ResourceDependency ones for the component actually on the page.
<script type="text/javascript" src="/showcase/javax.faces.resource/jquery/jquery.js.jsf?ln=icefaces.ace"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/jquery/jquery.js.jsf?ln=icefaces.ace&v=1255606960" id="j_id6"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/jquery/ui/jquery-ui.js.jsf?ln=icefaces.ace"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/jquery/ui/jquery-ui.js.jsf?ln=icefaces.ace&v=1255606960" id="j_id7"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/core/core.js.jsf?ln=icefaces.ace"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/core/core.js.jsf?ln=icefaces.ace&v=1255606960" id="j_id8"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/yahoo-dom-event/yahoo-dom-event.js.jsf?ln=yui/2_8_2"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/yahoo-dom-event/yahoo-dom-event.js.jsf?ln=yui/2_8_2&v=1255606960" id="j_id10"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/element/element-min.js.jsf?ln=yui/2_8_2"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/element/element-min.js.jsf?ln=yui/2_8_2&v=1255606960" id="j_id11"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/util/combined.js.jsf?ln=icefaces.ace"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/util/combined.js.jsf?ln=icefaces.ace&v=1255606960" id="j_id13"></script>
Here's the full head tag:
<head>
<link type="text/css" rel="stylesheet" href="/showcase/javax.faces.resource/themes/sam/theme.css.jsf?ln=icefaces.ace">
<link type="text/css" rel="stylesheet" href="/showcase/javax.faces.resource/demo_template.css.jsf?ln=css">
<link type="text/css" rel="stylesheet" href="/showcase/javax.faces.resource/override_styles.css.jsf?ln=css">
<link type="text/css" rel="stylesheet" href="/showcase/javax.faces.resource/showcase_styles.css.jsf?ln=css">
<link type="text/css" rel="stylesheet" href="/showcase/javax.faces.resource/forms/forms.css.jsf?ln=icefaces.ace">
<link type="text/css" rel="stylesheet" href="/showcase/javax.faces.resource/jquery/ui/jquery-ui.css.jsf?ln=icefaces.ace">
<script type="text/javascript" src="/showcase/javax.faces.resource/jquery/jquery.js.jsf?ln=icefaces.ace"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/jquery/ui/jquery-ui.js.jsf?ln=icefaces.ace"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/core/core.js.jsf?ln=icefaces.ace"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/datetimeentry/datetimeentry.js.jsf?ln=icefaces.ace"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/yahoo-dom-event/yahoo-dom-event.js.jsf?ln=yui/2_8_2"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/element/element-min.js.jsf?ln=yui/2_8_2"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/tabview/tabview-min.js.jsf?ln=yui/2_8_2"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/util/combined.js.jsf?ln=icefaces.ace"></script>
<link type="text/css" rel="stylesheet" href="/showcase/javax.faces.resource/util/combined.css.jsf?ln=icefaces.ace">
<script type="text/javascript" src="/showcase/javax.faces.resource/jsf.js.jsf?ln=javax.faces&v=1255606960" id="j_id3"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/icepush.js.jsf?v=1255606960" id="j_id4"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/bridge.js.jsf?v=1255606960" id="j_id5"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/jquery/jquery.js.jsf?ln=icefaces.ace&v=1255606960" id="j_id6"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/jquery/ui/jquery-ui.js.jsf?ln=icefaces.ace&v=1255606960" id="j_id7"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/core/core.js.jsf?ln=icefaces.ace&v=1255606960" id="j_id8"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/accordion/accordion.js.jsf?ln=icefaces.ace&v=1255606960" id="j_id9"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/yahoo-dom-event/yahoo-dom-event.js.jsf?ln=yui/2_8_2&v=1255606960" id="j_id10"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/element/element-min.js.jsf?ln=yui/2_8_2&v=1255606960" id="j_id11"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/button/button-min.js.jsf?ln=yui/2_8_2&v=1255606960" id="j_id12"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/util/combined.js.jsf?ln=icefaces.ace&v=1255606960" id="j_id13"></script>
<link type="text/css" rel="stylesheet" href="/showcase/javax.faces.resource/checkboxbutton/checkboxbutton.css.jsf?ln=icefaces.ace">
<link type="text/css" rel="stylesheet" href="/showcase/javax.faces.resource/button/assets/button-core.css.jsf?ln=yui/2_8_2">
<script type="text/javascript" src="/showcase/javax.faces.resource/confirmationdialog/confirmationdialog.js.jsf?ln=icefaces.ace&v=1255606960" id="j_id14"></script>
<link type="text/css" rel="stylesheet" href="/showcase/javax.faces.resource/wijmo/wijmo.css.jsf?ln=icefaces.ace">
<script type="text/javascript" src="/showcase/javax.faces.resource/wijmo/wijmo.js.jsf?ln=icefaces.ace&v=1255606960" id="j_id15"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/menu/menu.js.jsf?ln=icefaces.ace&v=1255606960" id="j_id16"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/dataexporter/dataexporter.js.jsf?ln=icefaces.ace&v=1255606960" id="j_id17"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/compat.js.jsf"></script>
<script type="text/javascript" src="/showcase/javax.faces.resource/icefaces-compat.js.jsf"></script>
<title id="title">ICEfaces Showcase</title>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link type="text/css" rel="stylesheet" href="./xmlhttp/css/rime/rime.css"></head>
Modified BridgeSetup to use JavascriptOutputResource-s for all resources including the mandatoryResources registered by components. Changed JavascriptOutputResource dynamic component to create these resources then append the extra query parameter used for cache invalidation. Stopped relying on the default script renderer for the JS resource since both Mojara and Myfaces implementations are not flexible enough to provide the required behaviour.
Removed MyFacesResourceHandlerFix resource handler since the createResource(...) method is called by JavascriptOutputResource without the extra parameter avoiding any confusion in the JSF implementation.