이 규칙에 따라 현재 페이지에 포함됩니다.
...
<c:if test="#{flowScope.Bean.param1}">
<ui:include src="one.xhtml"/>
</c:if>
<c:if test="#{!flowScope.Bean.param1}">
<ui:include src="other.xhtml"/>
</c:if>
...
지금까지 one.xhtml
는 other.xhtml
과 동작 매개 변수 만 다릅니다.
one.xhtml : <h:commandLink action="actionOne">
other.xhtml : <h:commandLink action="actionTwo">
일부 일반 xhtml을 사용할 수 있습니까?
one.xhtml 및 other.xhtml 대신 다음과 같이하십시오.
...
<c:if test="#{flowScope.Bean.param1}">
<ui:include src="general.xhtml" param="actionOne"/>
</c:if>
<c:if test="#{!flowScope.Bean.param1}">
<ui:include src="general.xhtml" param="actionTwo"/>
</c:if>
...
도움을 주셔서 감사합니다.
덕분에, 난 CC에 대해 khow, 그들은 큰하지만, 현재의 jsf 1.2 프로젝트에서 사용할 수 없습니다. 솔루션을 시도하고 결과를 다시 써 보겠습니다. – sergionni
질문에 제시된대로 작동합니다. 그러나'actionOne' 대신에'# {bean.doSomething}'을 사용했다면 JSF 2.0 복합 컴포넌트를 실제로 가져와야 할 것입니다. – BalusC
이상한, 그것은 던졌습니다 : action = "# {action}": Identity 'action'이 null이고 – sergionni