-
1. Re: Problem with <a4j:include> in richfaces 4
jgomezp Jun 10, 2011 4:33 PM (in response to jgomezp)I solved the problem you those references:
* http://richfaces-showcase.appspot.com/richfaces/component-sample.jsf?demo=togglePanel&skin=blueSky
* http://www.jroller.com/a4j/entry/richfaces_4_wizard_like_behavior
I did some like this:
page index.xhtml
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
</h:head>
<h:body>
<rich:togglePanel switchType="ajax">
<rich:togglePanelItem name="item1">
<ui:include src="/prueba.xhtml"/>
</rich:togglePanelItem>
<rich:togglePanelItem name="item2">
<ui:include src="/prueba2.xhtml"/>
</rich:togglePanelItem>
</rich:togglePanel>
</h:body>
</html>
page prueba.xhtml
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
</h:head>
<h:body>
PAGINA 1
<h:form>
<a4j:commandButton value="pagina2">
<rich:toggleControl targetItem="item2" event="click"/>
</a4j:commandButton>
</h:form>
</h:body>
</html>
page prueba2.xhtml
<ui:component xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
pagina 2
</h:head>
<h:body>
pagina 2
<h:form>
<a4j:commandButton value="pagina1">
<rich:toggleControl targetItem="item1" event="click"/>
</a4j:commandButton>
</h:form>
</h:body>
</ui:component>