javax.el.PropertyNotFoundException: /flow1/flow1.xhtml at line 17 and column 70 value="#{flowScope.value}": Target Unreachable, identifier 'flowScope' resolved to null.
我有flow.xhtml
页面从那里我设置下面的值是这样的:
<span id="param1FromFlow1">
Flow bean param1Value:
<h:inputText id="input" value="#{flowScope.value}" />
</span>
但是未选择服务器的隐式对象flowScope
在 websphere 8.0.0.7 中出现错误。
在我也更改为页面 bean 之后,页面 bean 声明为 @FlowScoped,在同一页面中再次出现以下错误;javax.faces.FacesException:javax.el.PropertyNotFoundException:/flow1/flow1.xhtml 在第 17 行和第 69 列 value="#{flow1Bean.name}":目标无法到达,标识符 'flow1Bean' 解析为 null
这是我的豆子:
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;
}
}
我的 Xhtml 文件:
<?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>
请帮我解决这个问题。