jsf 2 - EL evaluation in a JSF page is not sequential -
i have xhtml ui:composition tag loading on ajax. using jquery ajax load url of xhtml. in loaded page, have el expression , after including source has few more el expressions. invariably, el expressions of included source being evaluated earlier 1 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, expect #{relationshipaction.followmember(param['relatetoprofile'])}
evaluated before el in included someother.xhtml. it's els in someother.xhtml evaluated first.
any idea going wrong?
the spec doesn't el expressions evaluated in textual order. component @ liberty evaluate el-expression in whatever phase of jsf lifecycle chooses. @ liberty evaluate under specific circumstances, or evaluate several times.
you should not assume particular order except rare cases spec defines it. in case, jsf 2.2's viewaction component, or prerenderview event might better fit. balusc explains use quite readably, think.
Comments
Post a Comment