Tienes JSF 1.2 (dos páginas one.xhtml y other.xhtml),
que se incluyen a la página actual por la siguiente regla:JSF 1.2: ui: include con los parámetros
...
<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>
...
En lo que difiere de one.xhtml
other.xhtml
solamente por parámetros de acción:
one.xhtml: <h:commandLink action="actionOne">
other.xhtml: <h:commandLink action="actionTwo">
¿es posible utilizar algún general xhtml? En lugar de
one.xhtml y other.xhtml, algo como esto:
...
<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>
...
gracias por la ayuda.
gracias, i Khow sobre cc, que son grandes, pero en la actual El proyecto jsf 1.2 no puede usarlos. Probaré su solución y escribiré sobre los resultados. – sergionni
Funcionará según la forma en que lo presentó en la pregunta. Pero si estuvieras usando '# {bean.doSomething}' en lugar de 'actionOne', realmente necesitarías obtener componentes compuestos JSF 2.0. – BalusC
extraño, arroja: action = "# {action}": Identity 'action' era nulo y no pudo invocar – sergionni