1
javax.el.PropertyNotFoundException: /flow1/flow1.xhtml at line 17 and column 70 value="#{flowScope.value}": Target Unreachable, identifier 'flowScope' resolved to null.

I have flow.xhtml page from there i'm setting the value below like this :

<span id="param1FromFlow1">
     Flow bean param1Value:
     <h:inputText id="input" value="#{flowScope.value}" />
</span>

but implicit object flowScope not picking the server am getting error in websphere 8.0.0.7.

after i changed to page bean also .Page bean declare as @FlowScoped ,again am getting error below in the same page; javax.faces.FacesException: javax.el.PropertyNotFoundException: /flow1/flow1.xhtml at line 17 and column 69 value="#{flow1Bean.name}": Target Unreachable, identifier 'flow1Bean' resolved to null

Here My bean :

package com.webage.beans;

import java.io.Serializable;

import javax.faces.flow.FlowScoped;
import javax.inject.Named;


@Named
@FlowScoped("flow1")
public class Flow1Bean implements Serializable {

    public String cusName;
    public String city;
    public String getName() {
        return this.getClass().getSimpleName();
    }

    public String doReturnValue() {
        return "return1";
    }

    /**
     * @return the cusName
     */
    public String getCusName() {
        return cusName;
    }

    /**
     * @param cusName the cusName to set
     */
    public void setCusName(String cusName) {
        this.cusName = cusName;
    }

    /**
     * @return the city
     */
    public String getCity() {
        return city;
    }

    /**
     * @param city the city to set
     */
    public void setCity(String city) {
        this.city = city;
    }
}

MY Xhtml file :

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<title>flow1</title>
<meta http-equiv="Content-Type"
    content="application/xhtml+xml; charset=UTF-8" />
    <link rel="stylesheet" type="text/css" title="Style"
        href="../theme/stylesheet.css" />
</h:head>
<h:body>
 <h:form styleClass="form" id="form1">
 <h1>First Page in Flow 1</h1>

        <p>
            <span id="param1FromFlow1">Flow bean
                param1Value:<h:inputText id="input" value="#{flow1Bean.name}" />
            </span>
        </p>

        <p></p>
        <h:commandButton type="submit" value="Next" styleClass="commandButton"
            id="button1" action="flow1a"></h:commandButton>
        <p></p>
    </h:form>

</h:body>
</html>

Please heklp me on this.

LaurentG
  • 11,128
  • 9
  • 51
  • 66
Baskaran
  • 21
  • 1
  • 5
  • Have you tried this `@Named("flowScope")` or `@Named("flow1Bean")` in the bean annotation? – Omoro Feb 06 '14 at 13:35
  • Thanks a lot for helping me Omoro ,I have done like below : Still am getting same error @Named("flow1Bean") @FlowScoped("flow1") public class Flow1Bean implements Serializable { – Baskaran Feb 06 '14 at 14:25
  • I have done like below : @Named("flowScope") @FlowScoped("flow1") public class Flow1Bean implements Serializable { - that is also not working still the same error. – Baskaran Feb 06 '14 at 14:33
  • Based on the name flowscope `flow1` I assume that you have this directory structure `flow1/flow1.xhtml` in your web pages, right? – Omoro Feb 06 '14 at 14:52
  • yes,"flow1/flow1.xhtml" directory structure. – Baskaran Feb 07 '14 at 05:40
  • could you please any one help on this? – Baskaran Feb 07 '14 at 12:36
  • I fixed the Problem now an facing Bean state is not saved in FlowScope.Here my bean code : @ManagedBean(name="flow1") @FlowScoped(value = "flow1") public class Flow1Bean implements Serializable { public String cusName; public String city; //here getter and setters } – Baskaran Feb 13 '14 at 09:19

0 Answers0