I have an XHTML with ui:composition tag which I am loading on AJAX. I am using a jQuery Ajax GET to load the URL of this XHTML. In the loaded page, I have an EL expression and after that I am also including another source which has a few more EL expressions. invariably, the EL expressions of the included source are being evaluated earlier than the one appearing before it.
Some.xhtml
<ui:composition ...
#{relationshipAction.followMember(param['relateToProfile'])}
<ui:include src="someOther.xhtml">
<ui:param name="profileUri" value="#{param['relateToProfile']}" />
<ui:param name="qualifier" value="#{param['qualifier']}" />
<ui:param name="cellStyleClass" value="#{param['cellStyle']}" />
</ui:include>
Here, I expect #{relationshipAction.followMember(param['relateToProfile'])}
to be evaluated before any EL in the included someOther.xhtml. But it's always the ELs in someOther.xhtml that get evaluated first.
Any idea what could be going wrong?