I will ilustrate my question using an example:
outerfile.xhtml:
<h:head>
<h:outputScript library="js" name="jquery-1.6.2.js" />
<h:outputScript library="js" name="outer.js" />
</h:head>
<h:body>
<h:panelGroup id="inner_panel">
<ui:include src="innerfile.xhtml" />
</h:panelGroup>
</h:body>
innerfile.xhtml:
<ui:composition ... >
<h:head>
<h:outputScript library="js" name="jquery-1.6.2.js" />
<h:outputScript library="js" name="inner.js" />
</h:head>
<h:body>
<h:panelGroup>
I Am Text in The Inner File!
</h:panelGroup>
</h:body>
</ui:composition>
My questions:
- Is it okay to declare the
jsfiles in the inner file the way I did? - Do I need (And Should I) declare the common (
jquery-1.6.2.js) again in the inner file? - What happens if I un-render and the re-render
inner_panelusing AJAX? Will the inner-included headers be reloaded?