Hi,
I have 2 flows in my sample application. (1) Login (2) Adhoc. Login Flow is shown below. On login we redirect the flow to another flow “adhoc”. Now from adhoc screen, I want to display the entered user name. But user name is shown as “blank”. Please suggest how to display the user name.
Also, buttons are not visible on screen. Any clue will be greatly appreciated.
Code:Login-flow.xml <?xml version="1.0" encoding="UTF-8"?> <flow xmlns="http://www.springframework.org/schema/webflow" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd"> <var name="user" class="za.coclient.UserBean"/> <view-state id="LoginMain" model="user" view="login.xhtml"> <transition on="login" to="complete" /> </view-state> <end-state id="complete" view="flowRedirect:adhoc" /> </flow>Code:Login.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:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:c="http://java.sun.com/jstl/core" xmlns:sf="http://www.springframework.org/tags/faces" template="/WEB-INF/layouts/standard.xhtml"> <ui:define name="content"> <h1>Login Required</h1> <div class="section"> <h:form id="loginform"> <fieldset> <div class="field"> <div class="label"><h:outputLabel>GCN:</h:outputLabel></div> <h:inputText id="username" value="#{user.username}"></h:inputText> </div> <div class="buttonGroup"> <sf:commandButton id="logon" value="Login" processIds="*" action="login" /> </div> </fieldset> </h:form> </div> </ui:define> </ui:composition>Code:Adhoc-flow.xml <var name="adhoc" class="za.co.payment.adhoc.AdHocPaymentManagedBean"/> <view-state id="AdhocMain" model="adhoc" view="adhocPayment.xhtml"> <transition on="submit" to="confirm" /> </view-state> <view-state id="confirm" model="adhoc" view="adhocPaymentConfirm.xhtml"> <transition on="confirm" to="finish" /> </view-state> <end-state id="finish" /> </flow>Thanks in advance.Code:adhocPayment.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:ui="http://java.sun.com/jsf/facelets" xmlns:c="http://java.sun.com/jstl/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:sf="http://www.springframework.org/tags/faces" xmlns:rich="http://richfaces.org/rich" template="/WEB-INF/layouts/standard.xhtml"> <ui:define name="content"> <h:form id="AdhocMain"> <fieldset> <div class="label"> Welcome #{user.username} </div> <div class="field"> <div class="label"><h:outputLabel>From Account No:</h:outputLabel></div> <h:inputText id="fromaccountno" value="#{adhoc.paymentFrom}"></h:inputText> </div> <div class="buttonGroup"> <sf:commandButton id="logon" value="Continue" processIds="*" action="submit" /> </div> </fieldset> </h:form> </ui:define> </ui:composition>
Regards,
ssroy


Reply With Quote