This content has been marked as final.
Show 1 reply
-
1. Re: AJAX Navigation
g00se24 Apr 27, 2007 8:34 AM (in response to g00se24)pages.xml
<page view-id="/login.xhtml"> <navigation from-action="#{identity.login}"> <rule if="#{identity.loggedIn}"> <redirect view-id="/start.xhtml"/> </rule> </navigation> </page> <page view-id="/empty.xhtml"> <navigation from-action="next"> <render view-id="/start/home.xhtml"/> </navigation> </page> <page view-id="/start/1.xhtml"> <navigation from-action="next"> <render view-id="/start/2.xhtml"/> </navigation> </page>
start.xhtml<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:a4j="https://ajax4jsf.dev.java.net/ajax" template="/layout/template.xhtml"> <ui:define name="body"> <f:view> <h:outputText value="Welcome, #{identity.username}" rendered="#{identity.loggedIn}"/> <h:form> <h:panelGrid columns="2"> <h:outputText value="Type the Text:" /> <h:inputText value="#{bean.text}"> <a4j:support event="onkeyup" reRender="repeater" /> </h:inputText> <h:outputText value="Text in the AJAX Response:" /> <h:outputText id="repeater" value="#{bean.text}" /> </h:panelGrid> <hr /> <a4j:log /> <a4j:commandButton value="Next" action="next" reRender="content" /> <h:panelGroup id="content"> <a4j:include viewId="/start/empty.xhtml" /> </h:panelGroup> </h:form> </f:view> </ui:define> </ui:composition>
The other referenced xhtml files does not contain anyathingn useful except static text.
My firefox reload the empty.xhtml (he shows the page a little bit moved to the left site)...