使用JBoss 6.0.0.Final,Richfaces 3.3.3.Final,MyFaces 2.0.6,facelets 1.1.15.B1(RF 3的限制).
我正在进行遗留项目,其中包含数百个定义的bean faces-config.xml
.我想保留faces-config.xml中定义的那些,但是对新bean使用注释.但是,当我尝试这个时,我没有成功.由注释定义的bean即
@ManagedBean
@ViewScoped
public class Foobar implements Serializable {
// ...
}
Run Code Online (Sandbox Code Playgroud)
从我的JSF页面无法访问该bean.我相信我已经通过使用正确的标头在faces-config.xml中指定了2.0版本.
<faces-config
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
version="2.0">
Run Code Online (Sandbox Code Playgroud)
还有什么我需要做的,faces-config.xml
以允许注释也被使用?