Boa tarde a todos,
Bom gostaria de umas dicas para ver se consigo resolver meu problema!
Descrevendo o problema:
Imagine que você tem uma pagina com layout defindo em duas parte!
parte superior e inferior!
Você tem dois Arquivos um define a parte superior e outro a inferior!
esses dois arquivos estão devidadamente registrado no faces-config.xml
Usando RichFaces com ajax como faço para que a a parte inferior reiderize,
quando eu clique em botao na parte superior!
Sem apagar a parte superior, já reiderizada!
este um exemplo que estou tentando montar quanse o dia todo.
li muitos posts aqui mesmo, mas ainda não consegui!
vou postar os dois arquivos + a parte do faces-config.xml
arquivo faces-config.xml
<navigation-rule>
<from-view-id>/exe1.xhtml</from-view-id>
<navigation-case>
<from-outcome>step2</from-outcome>
<to-view-id>/exe2.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/exe2.xhtml</from-view-id>
<navigation-case>
<from-outcome>step3</from-outcome>
<to-view-id>/step3.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>back</from-outcome>
<to-view-id>/exe1.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
arquivo exe1.xhtml
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:rich="http://richfaces.org/rich">
<ui:composition>
<a4j:region id="ajaxCadastro">
<a4j:outputPanel id="saida">
<a4j:form>
<h:panelGrid columns="2">
<h:outputText value="Nome" styleClass="label"></h:outputText>
<h:inputText size="25" value="#{registrationBean.firstName}" />
</h:panelGrid>
<a4j:commandButton value="Salvar" action="step2" reRender="stepss" rendered="true" />
</a4j:form>
</a4j:outputPanel>
</a4j:region>
<a4j:region id="stepss" rendered="false" >
</a4j:region>
</ui:composition>
</html>
arquivo exe2.xhtml
<?xml version="1.0" encoding="ISO-8859-1"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:rich="http://richfaces.org/rich">
<rich:panel>
<f:facet name="header">
<h:outputText id="step" value="parte Dois" />
</f:facet>
<a4j:form>
<h:panelGrid columns="3" columnClasses="gridhellocolumn">
<h:outputText value="Email" />
<h:inputText value="#{registrationBean.email}" />
<h:commandButton value="Hello 22" action="step3">
<a4j:support rendered="out" event="onclick" />
</h:commandButton>
</h:panelGrid>
</a4j:form>
<rich:spacer height="20px" />
</rich:panel>
</ui:composition>
Veja que quando clico no botao do arquivo um, ele chama o arquivo 2 e apaga o arquivo 1 reiderizado no cliente
na verdade deveria ser tipo uma soma, caregado o arquivo 2 em uma determinada tag do arquivo 1
Entendem?